Community
Participate
Working Groups
I have fairly large workspace (many thousands files in 150+ projects). Whenever I try to create a new file, "New File" dialog stays locked for 15-20 seconds before I can start typing file name. CPU utilization is 100% during this time. Eclipse 3.2 I20060331-2000, WinXP SP2, tried with both IBM Java 1.5.0 SR1 and SUN 1.5.0_05.
Created attachment 38644 [details] CPU statistics Not sure how trustworthy this data is, but here is where the time is spent according to Yourkit profiler. As you can see, the problem seems to be related to some label decoration activities happenning in the UI thread, and indeed, disabling all label decoration makes the problem go away.
Thanks for the profiling data! Do you know if this performance problem is new in 3.2?
I believe it is a recent regression, 3.1.2 does not have this problem and I do not remember anything like this in 3.2M4 either. I setup test CVS repository you can use to reproduce the problem (nothing fency, just 150 java projects with couple of classes each). Please email me directly if you want to access it.
Could you possibly attach a stack trace? It is most likely an issue with someone locking the workspace while you are creating the file rather than the decorators. If you run with the -consolelog option you will get a window that will allow you to get a stack trace with a control break
Created attachment 38673 [details] stack trace while the dialog is locked StructuredViewer.update(Object[], String[]) uses unscalable ON^2 algorithm. With 150 projects this results in 20k+ iterations. It also seems that this method is called two (or more) times when I open new file dialog. Just an observation...
Created attachment 38681 [details] possible fix Not sure if there is more to this problem, but this one-line patch makes NewFile dialog usable virtually instantaneously.
Spot on Igor - if you don't use hash lookup the lookup goes from O(1) to O(n) for each lookup. I think you are spot on - I'll see this gets into 3.2. Thanks for all of your help.
Marking fixed
Verified in 20050425