New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoking StateChanged (ResolvedDeclarations) takes about 3 minutes (locking the VBA Editor for this time) #5105
Comments
Hey, thanks for the kind words. Here's the timeline for the parsing runs you attached. The first run is the initial parse. All modules are parsed here. Notably, Inspections are not run here, which means the initial parsing clocks in at about 220 seconds, roughly three and a half minutes (10:25:57 -> 10:29:38)
A whole five seconds later, the next parsing run is triggered after indenting the current Module (
Interestingly here, the parsing of the changed module is significantly faster (what with only parsing a single module), but resolving references takes about the same time. This parsing run clocks in at 197 seconds, yet the constituent stages of parsing can not account for roughly 170 of these seconds, which is ... deeply worrying. Bottom line: We kinda really need to find out where parsing is bleeding unaccounted time to have a chance to adress this... |
I see that you use the stable last release. Could you try the current prerelease, or one from the last two months? I recall observing this and analyzing it under a profiler. I think some (partial) fix has been implemented at some point after the last stable release. |
@Vogel612 The stages do not contain the invokation of the event handlers for the state changed events. I think the problem here was/is in the CE refresh. |
I did some digging. The freeze mentioned here has already been observed in issue #4905 and the main sources should have been fixed in the PRs #4918 and #4914. The main source was that the CE refresh reloaded settings over and over from file because of a bug in the code for loading the settings. This bug prevented the intended caching to happen. Unfortunately, there has not been a stable release since the fix. |
Hello MDoerner and Vogel612, Many thanks for the fast response. As advised, I will now try installing the latest availabl release and report on this. Thanks, |
Hello MDoerner and Vogel612, THE ISSUE IS NOW RESOLVED FOR ME -- as advised by MDoerner I installed the latest release available at this time (which was Rubberduck v2.4.1.4869-pre) and the problem seems to have disappeared. This was truely great response from you both -- thank you very much indeed for your help and time. Thanks to MDoerner for suggesting to use the latest release, and to Vogel612 for helping with the initial analysis (and for even editing my first post to make it more readable -- I will remember now to use "..." for inserting code, rather than the "backquote" which I had used originally). Kind regards, |
Hello,
Thank you very much indeed for having created and for supporting this fantastic free tool -- I am very grateful to you and all who participated and so generously donated their time and expertise to the creation and maintenance of this tool. I feel a little awkward needing to point that in my case there seems to be a problem with the tool and that I may need your help (and thus detract your attention from whatever more useful and important you might be doing).
Also, I am not sure whether this is the right forum for asking such questions or reporting such [potential] problems, but I was not able to find any other forum -- please advise if there is a more suitable one and I will remove my post from here.
MY PROBLEM: every time Rubberduck invokes StateChanged (ResolvedDeclarations) it takes about 3 minutes (150-200 seconds) to finish, during which time the VBA Editor remains locked (entirely unresponsive). Having to wait 3 minutes at the start is not that bad, but when this happens every time I perform code indent with Rubberduck (i.e. every two or three minutes of coding) it may become annoying. (Why? Because working for 2 or 3 minutes and then waiting for another 2 or 3 minutes seems like not very productive work.) Here is an extract from the Rubberduck log to illustrate the issue -- note the time between the second and third lines (please see the entire log attached):
MY QUESTIONS:
(1) Is there a way how to disable automatic invoking of StateChanged (ResolvedDeclarations) after code indenting with Rubberduck? (I was not able to find this in Rubberduck settings, and also I have already cleared the checkbox for "Run Inspections Automatically on Successful Parse" in the Code Inspection Settings).
(2) Is there anything to prevent the VBA Editor from becoming locked (entirely unresponsive) for this long time (stupid question, I know, but perhaps I am missing something obvious)?
Or, is it that I am doing something completely wrong? (I suppose difficult to say without any further information from my end -- but if there is anything that I could provide please advise).
Once again, apologies if this is not the right forum for such questions and problems. And many thanks indeed for the excellent tool -- at long last VBA is on the brink of entering the 21st century!
Kind regards,
Radio Engineer.
P.S. I use VBA extensively in my job and in my hobbies. Rubberduck in general (and its indent function specifically in this case) are of great use and help to me.
RubberduckLog.txt
The text was updated successfully, but these errors were encountered: