Bug 64097 - Loading icons always lookup the bundle
Summary: Loading icons always lookup the bundle
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2004-05-26 09:24 EDT by Pascal Rapicault CLA
Modified: 2004-06-09 11:08 EDT (History)
2 users (show)

See Also:


Attachments
Patch for the described problem (13.79 KB, patch)
2004-05-26 09:26 EDT, Pascal Rapicault CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2004-05-26 09:24:58 EDT
When UI and IDE are loading the icons, they are looking up the bundle for every
icon they are trying to load. Looking up a bundle is not specially slow but is
not the fastest operation either, therefore it could be great if you could
lookup the bundle once and use it to load all the icons.

Doing that will probably slightly improve the startup time.
Comment 1 Pascal Rapicault CLA 2004-05-26 09:26:04 EDT
Created attachment 11129 [details]
Patch for the described problem

The patch provided only fixes the problem in IDE.
Comment 2 Ines Khelifi CLA 2004-05-28 11:31:24 EDT
I applied the patch to "ide" and observed Pascal's changes. As he stated, his
fix allows the bundle to be looked up once for all icons. I checked out
"platform-ui" and searched (Java method search) "getPlugin()" to try and flag
similar issues.

Here are the instances I found that involve images (they are all in
"org.eclipse.ui.ide")
- WizardStepGroup#createImage(String iconFileName)
- BookmarkNavigator#getImageDescriptor(String relativePath)
- FrameAction#getImageDescriptor(String relativePath)
- ImageFactory#create(String path)
- ResourceNavigatorActionGroup#getImageDescriptor(String relativePath)
- MarkerUtil#createImageDescriptor(String relativePath)
- FileSystemExportWizard#getImageDescriptor(String relativePath)
- FileSystemImportWizard#getImageDescriptor(String relativePath)
- ZipFileExportWizard#getImageDescriptor(String relativePath) 
- ZipFileImportWizard#getImageDescriptor(String relativePath)

Some of the above are not referenced very often and/or do not affect the start
up time. They might not be worth changing.
Tod, are there other classes (or searches) you can think of I might have omitted?
Comment 3 Tod Creasey CLA 2004-05-28 11:34:46 EDT
The other main one is WorkbenchLabelProvider which also happens on startup. As 
I optimized this last week there is likely nothing else to be done there.

Ines please attach yoiur WorkbenchAdvisor patch
Comment 4 Tod Creasey CLA 2004-05-28 11:40:21 EDT
Ines has checked - I will verify and we will address this in RC2.
Comment 5 Tod Creasey CLA 2004-06-08 11:15:23 EDT
Patch released for build > 20040608
Comment 6 Tod Creasey CLA 2004-06-09 11:08:23 EDT
Verfied in 20040609