Resolve becomes slower over time .
已回答
I have implemented resolve functionality for a custom language, using scope processor+stubs approach. When the Intellij is first started up resolve is fast. I implemented an inspection which relies heavily on resolve. When the inspection is tun on the entire project using Analyze > Inspect Code..., resolve gradually becomes slower. Profiling shows the following:Running the inspection on the entire project starts between 1 minute and 2 minutes. Progress becomes noticeably slower at 7+ mins.
I'm unsure what causes the massive drop in cpu load slightly after 8 minutes.
Any advice on debugging/ideas as to what might be causing this?
请先登录再写评论。
This is rather strange. Could you please provide a YourKit CPU snapshot (https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems)?
Part of the problem seems to be lock in com.intellij.codeInspection.ui.DefaultInspectionToolPresentation.addProblemElement, that is not being acquired quickly enough.
I have uploaded the requested cpu snapshot here: https://drive.google.com/file/d/0BwQeXj4R-BqYd0hRM21JTnlralk/view?usp=sharing , and at https://uploads.services.jetbrains.com/ with the name: Main-2017-08-14.snapshot
@13nixonf Thanks, the problem is inside inspection tree building.
I've created an issue https://youtrack.jetbrains.com/issue/IDEA-177590 . But don't expect a very fast fix, will be only for 2017.3. For now only I removed a global lock.