|
|
|
[
Permlink
| « Hide
]
Bas Leijdekkers - 02 Mar 07 17:33
Some editing with Hector set on Syntax only. Let me know if you need any more.
Hmm, I noticed something similar, though I think it's actually worse on my new dual core machine now than it was before - but that could be a coincidence with some changes in IDEA. My basic theory is that either IDEA does not (enough) reduce the priority of the parsing/highlighting threads and/or should not use all available cores for the highlighting to keep a spare one that allows the rest of the IDE to stay responsive.
An easy, preliminary solution might be to introduce a system-property that says how many cores IDEA should use, instead of using Runtime.getAvailableProcessors() My theory is that idea suffers from two problems:
We could both be right Snapshot of typing with two projects open. After typing something in one project, both projects were analyzed (judging by the little square in the top right of the editor).
Bas,
in your case the problem seems to be in open project view Mike,
It does seem that way, but I am not doing anything with the project view. Why does it have to use so much cpu? And why does it use twice as much cpu when I have two projects open? But at least I have a workaround now, closing the project pane seems to alleviate the problem a bit. Thanks for looking into it. btw I see 2 seconds in com.intellij.openapi.vfs.impl.local.VirtualFileImpl.getPhysicalFileLength() that is not cached, but delegates to file system
another 2 secs are in PsiClass.isInterface() and PsiClass.isAnnotationType() that not cached too, delegating to the repository.
I'm getting horrendous slow-downs as well when inspections are in progress (see attached CPU snapshot). I'm on a dual-core machine and the CPU is completely maxed out when the inspections are happening - for example, the class that was being inspected for the snapshot takes almost 30 seconds to finish processing and in that time the IDE was really unresponsive.
One thing I have just noticed is that if you have the IDE in a split configuration, ie. two sets of tab groups, certain things like "Reformat Code" occasionally trigger inspections in both editor panes. Obviously one of the editor panes won't have changed, so I'm not quite sure why it's being re-inspected. Sorry I should add that the inspections I'm talking about are the in-editor inspections highlighting, not the manually triggered inspections.
Attached two short-duration CPU snapshots captured during (slow) editing. 4 projects were open.
Taras, these snaphots you've attached show it is Project View|Packages update that causes slowness. Closing Project View(or switching from Packages View to Project) can help.
|
|||||||||||||||||||||||||||||||||||||||||||