Slow responsiveness when Debugger is attached
Closed this issue · 11 comments
Hi,
I found "RevitLookup" to be a very handy tool for developing my own Revit plugin and I use it daily.
Although it is usually very responsive, it takes considerably longer per click (5-10 seconds) when I open Revit with the VS Debugger attached.
Any idea why that might happen?
@guffab during debug uses unoptimised code, any Debug build will be slower than Release. However 5-10 seconds is not normal, without more information there is no idea what the problem is
@Nice3point I think there is also a misunderstanding. I am not debugging the RevitLookup tool, but my own plugin. As far as I know, this should not have any affect on Revit or other plugins.
Plugins are running inside Revit process, debugger can be attached only to the whole process, therefore you are debugging every loaded assembly that is not build with optimization enabled or there are available debug symbols (*.pdb) for it.
So am I correct to assume the version of RevitLookup I installed was not built in Release Mode and it also includes .pdb files?
Could this be the reason for the issue I am seeing?
I should also mention there is no issue with versions prior to Revit 2024. Maybe it has something to do with the UI change?
RevitLookup is published in Release mode, and does not ship with pdb files.
If your plugin is not protected by NDA, you can send us the source code to understand what the problem is. We cannot answer your question without analysing it
Here is a bare-bones version of my plugin. To reproduce the issue:
- Unpack
- Open in Visual Studio
- Start with Debugger
- Open existing project or create a new one
- Select an element and click RevitLookup > Snoop Selection
@guffab the code is completely empty, it doesn't cause any problems, everything works fine as before during debugging
Interestingly enough, on my PC (and those of my colleagues) there doesn't have to be any actual code in the project to reproduce it. Did you test it with the Visual Studio Debugger or only with Jetbrains Rider?
Snoop Selection of different elements and clicking on their Properties/Methods also works smoothly for you?
@guffab i see. indeed the slowdown in performance is felt quite critically.
Maybe Visual Studio users can help you, I use Jet Brains debugger and I can't test VS debugger. In my case this is not observed
I tested in Visual Studio 2022 with the last version (2024.1.4) and looks normal. I'm using Revit 2024.0.
Only the EventMonitor that is showing something in the console:
2024-05-17 14:00:14 [DBG] RevitLookup.Core.EventMonitor: RevitLookup EventMonitor: Autodesk.Revit.DB.Document.DocumentClosing
2024-05-17 14:00:14 [DBG] RevitLookup.Core.EventMonitor: - success
...
Looks normal.