Community
Participate
Working Groups
build i0208 Not sure where to enter this report. Adding Tod and John to CC as they will be involve in performance work this release. I have the Platform/UI heap usage plug-in installed. I notice that when I switch focus from the editor to a view (e.g. Outline), the heap usage increases by a meg or 2. Putting focus back to the editor does the same. This happens with both the text editor and more prominatly with the Java editor. It doesn't matter if the view is docked or is a fast view.
Assigning to Tod to get this out of the inbox. Please reassign if necessary.
This is caused by the JFace key binding code. 2.5 MB of Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry objects are created each time the Java editor gains focus. A smaller amount (1 to 1.5 MB) is allocated when other parts gain/lose focus.
I added a reverse look-up map, and a performance test. The performance tests went from about 65000 ms to about 140 ms. The bound on the method also went from O(n) to O(1) [amortized], which helps significantly on large binding sets. John: could you verify this fix sometime Tuesday or Wednesday?
Verified in I20050215-0800 Part activations no longer cause any of those entry objects to be created. There are still about 200-300 KB of garbage objects created on each part activation (when switching focus between editor and outline, for example). This almost all comes from key formatter code. I'm not familiar enough with this code to know if there are further opportunities for improvement. Anyway, the main performance bug here is fixed and verified.