Possible reason 6.0 EAP is so slow (at least on XP)

I noticed that after working with IntelliJ 5594 for a bit in Windows XP,
that the amount of "handles" that it uses rises to about 16,000 to 18,000.
Most programs that hog windows resources don't even use more than 4,000
handles. Windows XP has a REAL problem with slow downs after the total
amount of handles gets past about 16,000 to 20,000 .. If you want to see how
many handles each of your programs use, open up the task manager, click on
the "processes" tab, click the "View" menu, then "Select Columns" and check
off "Handle Count". You will see that most programs are in the 100 to 1,000
range for handle count but IntelliJ is WAY up there in the 12,000 to 16,000
range. To see the total handle count, click the "Performance" tab and at the
bottom is the Total Handle count.

Is there a reason IJ needs so many handles?



I'm using svn. But if I remember correctly, disabling the svn does not help.


Hello Jetbrainers,

I did a bit of profiling, which may have revealed the cause of leak.

Firstly Jprofiler showed me that the amount of allocated com.intellij.openapi.vfs.impl.VirtualFilePointerImpl correspond to the amount of the handles. Secondly Jprofiler was nice enough to point me to the root of gc (in some of the 50000 instances of VirtualFilePointerImpl) , which was com.intellij.ide.highlighter.XmlFileHighlighter (See the attached picture).

Thirdly some empirical studies backed up the possible cause of the leak: Last night, when I had no xml files in the editor, the amount of handles did not rise at all. Also, when I look at the handle count while randomly clicking the xml file in the editor, the handle count rises usually by three.

hth, tuomas


Since there did not seem to be an issue about the bug in jira, I created one:


Please sign in to leave a comment.