rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.91k stars 299 forks source link

Code Inspections results window freezes VBE #4928

Open pstiefel opened 5 years ago

pstiefel commented 5 years ago

Rubberduck version information Rubberduck Version 2.4.1.4627 OS: Microsoft Windows NT 6.2.9200.0, x64 Host Product: Microsoft Office 2010 x86 Host Version: 14.0.7230.5000 Host Executable: MSACCESS.EXE

Description The Code Inspections results window hangs/freezes the VBE when changing the displayed results by any means (filtering, expanding/collapsing, grouping)

To Reproduce

  1. Run the code inspections in a non-trivial legacy project (100+ modules) with lots of results (800+)
  2. Click on any button that changes the displayed results (e.g. Filter, Grouping)
  3. Observe: The VBE freezes/hangs for multiple seconds (I experienced up to 90 seconds!)

Expected behavior Better performance of the Code Inspections results window. I don't want put hard performance expectations here, but the current performance is too bad to use Code Inspections at all on any non-trivial legacy project.

Vogel612 commented 5 years ago

I assume this will be partially alleviated by this PullRequest. Note that we recently removed the aggregation of inspection results, which grouped multiple inspection results coming from the same inspection when there were more than 128 results: https://github.com/rubberduck-vba/Rubberduck/pull/4898

Could you try using a prerelease before 2.4.1.4666 and see whether the issue remains quite as pronounced?

pstiefel commented 5 years ago

I just tried version 2.4.1.4661.

The number of inspection results went up from ~860 to ~13.000! (Exact same project as before!)

Tying to expand any group in the inspection results freezes the VBE for 30 seconds and then completely crashes the host application.

This is reproducible and happens always. (Tried 5 times)

I run a trace log during the operation (~2.5MB), but IMO it contains no info related to the crash.

hugelsb commented 5 years ago

Just discovered Rubberduck and tried out. First impression is very good, but it is very slow and hanging when using Code Inspection on an existing VBA Excel project with ~40 modules.

Vogel612 commented 5 years ago

@hugelsb could you tell us which version you're using exactly?

@pstiefel the latest prerelease includes the changes that might alleviate the issue a bit. Could I ask you to check your findings against the latest prerelease?

hugelsb commented 5 years ago

Version 2.4.1.4674 OS: Microsoft Windows NT 10.0.17763.0, x64 Host Product: Microsoft Office 2013 x86 Host Version: 15.0.5101.1000 Host Executable: EXCEL.EXE

pstiefel commented 5 years ago

@Vogel612 : I just tried version 2.4.1.4674-pre. I still get 13k inspection results instead of ~860 with 2.4.1.4627. Expanding any of the result groups still hangs for ~30 secs and then crashes the host application. So, no changes from v2.4.1.4661 for me.