codemaid icon indicating copy to clipboard operation
codemaid copied to clipboard

Spade hangs Visual Studio if you switch between long files

Open Hermholtz opened this issue 2 years ago • 1 comments

Environment

  • Visual Studio version: 2022 Community
  • CodeMaid version: 12.0
  • Code language: C#

Description

CodeMaid Spade hangs the whole Visual Studio if you switch between long source files too quickly/too frequently.

Steps to recreate

  1. Have at least 2 (preferrably more) source files of at least 1000 lines and many properties, methods etc. open in tabs.
  2. Activate CodeMaid Spade, you'll see the spinner and eventually it'll show the source structure.
  3. Now try to navigate multiple times with CTRL+TAB to other source files, do it quickly so that the spinner does not go away (Spade does not finish parsing the code).
  4. Observe that Visual Studio hangs at some point (rather quickly, I can invoke this in ~5 seconds).

NOTE the CTRL+TAB is meant only to show the repro. It happens during normal usage of VS such as CTRL+click (go to definition), go back etc.

Current behavior

Visual Studio hangs for good and all unsaved changes to source files are lost.

Expected behavior

Spade correctly aborts (cancels) parsing and rendering current file once another editor tab is activated.

Additional info

This is not a new behavior, I've observed it for years, also in previous versions of VS/CodeMaid, but it started to affect me really badly. Maybe I'm too fast for it, or my coding habits are bad, or the source files are too long, but still I think it shouldn't hang VS under any circumstances. Also, the hardware is quite adequate - Ryzen 7, 32 GB of RAM, NVMe, no bottlenecks here.

Thank you.

Hermholtz avatar Aug 10 '23 10:08 Hermholtz

Thanks for reporting the issue. It is a known limitation that large files are not supported very well.

codecadwallader avatar Oct 28 '23 14:10 codecadwallader