How do I narrow down the cause of extreme delays/hangs? #1192
Unanswered
emeraldcheshire
asked this question in
Q&A
Replies: 2 comments 3 replies
-
Make sure you run with UI Freeze Monitoring enabled and check the error log view after hangs, it should report stack traces for the code that freezes UI: |
Beta Was this translation helpful? Give feedback.
3 replies
-
It may be worth reading the notes on indexer issues in the FAQ here: https://github.com/eclipse-cdt/cdt/blob/main/FAQ/Indexer.md |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a fairly large C++ project that I've been using with CDT for 10 years. Recently I noticed a certain files experience extremely slow performance with anything related to code analysis (syntax, completion, hover tips etc). I'm not sure when this started and can't pin it to an Eclipse version change. It manifests as taking 30-60 seconds to fully syntax highlighting the file, taking forever to update syntax highlights when I type, anything analysis related. Sometimes it will show EnclosingASTNameJob as the action taking place in the bottom right, but other times it won't say anything is going on other than being slow. When this is going on, Eclipse is burning CPU.
The file in question isn't always large. It seems related to particular classes being derived from, but I have not been able to isolate a single cause. By commenting stuff out and incrementally simplifying some of the base classes I was able to identify the following class which could trigger the problem:
Note that I closed Eclipse and deleted the pdom file between each test.
By further trimming, I found that the instance() function was triggering the problem and, strangely, simply renaming instance() to something else would make the problem stop. I tested going back and forth to confirm. Just renaming that member function would make the laggy file speedy and normal.
However, when I put back everything else I had previously stripped the file became laggy again. That stuff involved some ugly template stuff (deriving from a template argument). So either there's something about templates or I'm chasing a red herring.
Any suggestions on how I can get more insight into what exactly it's getting stuck/slow on?
Beta Was this translation helpful? Give feedback.
All reactions