Project: Eclipse_Platform_UI
Bug 11484 [Contributions] Contributions are being rebuilt too often
Reported: 2002-03-15 12:50:56 | Status: resolved fixed

This started out as an investigation to see if we were reading image files multiple times and ended up exposing bigger problems. If you open two java editors and switch between them you will notice that the perspective .gif files are being read every time the editor changes. This turns out to be the result of calling ChangeToPerspectiveMenu.createMenuItem() as it creates new images each time. A hack to cache the images or avoiding making this menu dynamic or avoiding recreating the menu when the perspective has not changed are incomplete fixes for this defect Problem 1. This method ends up being called from the OutlineView's update call. This does not make any sense. I can understand that we have to update the local toolbar for the OutlineView. This does not imply that we have to update everything else. Problem 2: It ends up being called twice. Once for the outline view, the other for the editor.

Files changed in fix:
bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/SubActionBars.java bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/ViewActionBars.java