Long analysis queue
In Spoofax s41769 queued analyses do not seem to be cancelled when the file changes. This seems to be an interaction with the outline view. As a result a long analysis queue builds up which:
- bogs down the editor
- probably sometimes causes deadlocks (do not have a thread dump yet, will look out for one and update)
I’m attaching a screen shot of the Progress view from Eclipse.
Submitted by Vlad Vergu on 21 July 2014 at 11:28
Attachments
Issue Log
It might not be just an interaction with the outline view; after closing the outline view the analysis queue is still very long. See second screenshot.
I remember several issues like this before, but can’t find them in YG. If the queue is filled and you wait a while, it will execute them all and finish (e.g. no CPU usage any more)? You could try turning off the outline calculation (by setting the outliner to
fail
in the Stratego file, commenting out the outliner in ESV doesn’t work) and see if that does anything?
Regarding outline jobs: because we don’t support parallel Stratego execution, the outline jobs will only be handled once name/type analysis is finished.
This may cause many outline jobs to be queued at once. However, this doesn’t mean we also invoke the outline Strategy many time. Eclipse has a machanism to discard outline updates if it is already busy updating the outline. If there are 10 outline jobs, it will only invoke the Strategy for the first and last jobs and ignores the other jobs.
This mechanism isn’t supported by the properties view though, so changing the text selection x times, will result in exactly x updates. However, if you close the outline view / properties view or if you don’t implement an outline / properties view, the outline / property transformations are not invoked. This should allow you to find out if the problem is related to the views.
What about the selection calculation? Wasn’t that turned into some kind of job as well?
Hmm there seems to be something off with that indeed. It may not run in a background thread yet because it is slow for large files. Let me have a look.
This is still an issue in Spoofax Core 1.2.0.0-s41772. While editing files the queue easily contains tens of analysis jobs which each take 1-2 minutes to complete. Sometimes the entire workspace hangs and Eclipse has to be restarted.
Have you tried the things we proposed in previous comments? Also, does this happen for any Spoofax language or just some? I cannot seem to reproduce it locally here.
Turning off the outline computation by settings:
outline-strategy = fail outline-expand-to-level = !0
makes no difference. The properties view is not active for this project; there is not properties strategy.
Log in to post comments