Bug 62335 - JavaElementImageProvider.getImage() is almost half of the label update time
Summary: JavaElementImageProvider.getImage() is almost half of the label update time
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.0 RC1   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2004-05-14 15:29 EDT by Tod Creasey CLA
Modified: 2004-05-31 11:57 EDT (History)
2 users (show)

See Also:


Attachments
Trace from Optimize It (58.20 KB, text/html)
2004-05-14 15:30 EDT, Tod Creasey CLA
no flags Details
YourKit Trace (43.45 KB, image/png)
2004-05-16 12:48 EDT, Dirk Baeumer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tod Creasey CLA 2004-05-14 15:29:54 EDT
20040514

JavaElementImageProvider.getImage() takes up 47% of the time in 
DecoratingLabelProvider.updateImage() in the Package Explorer (I will attach 
the trace).

My setup is
1) Package explorer open with org.eclipse.swt and org.eclipse.swt.win32 open.
CVS decorator is on
2) Select the project org.eclipse.swt
3) expand the project
Comment 1 Tod Creasey CLA 2004-05-14 15:30:29 EDT
Created attachment 10665 [details]
Trace from Optimize It
Comment 2 Dirk Baeumer CLA 2004-05-16 12:46:27 EDT
I tested it using YourKit expanding JDT/UI (I don't have SWT in source). The 
relations of the number are the same, however I have some questions:

- DecoratingLabelProvider.updateLabel takes 8% of the whole time spent to 
  expand the node. So optimizing this will not significantly speed up expanding
  nodes.

- the 8% are spitt as follows:
  o 3% org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvide.decorateImage
    This does the error tick annotation and is already optimized. We can't do
    any better here.
  O 3% is spend in JavaElementImageProvider.getImageLabel(). Looking deeper 
    into the call stack reveals that 
    1% is spent in WorkbenchResource.getImageDescriptor
    1% is spend in ImageDescriptor.createImage
  o 2% org.eclipse.ui.internal.DecoratorManager.prepareDecoration

So 50% of the time spent in DecoratingLabelProvider.updateLabel() is spent in 
JDT/UI code and 50% in Platform/UI code.

Since JavaUILabelProvide.decorateImage take 75% of the time spent in JDT/UI 
code and this code is already optimized I don't see how we can speed up things 
here. Moving back to Platform/UI to check if something can be done in 
Platform/UI code.
Comment 3 Dirk Baeumer CLA 2004-05-16 12:48:29 EDT
Created attachment 10708 [details]
YourKit Trace
Comment 4 Tod Creasey CLA 2004-05-26 14:02:22 EDT
See Bug 63407 for the image creation work we are going to do (specifically 
buffering as well).

I will close this one as JDT has done their part of the investigation now.
Comment 5 Tod Creasey CLA 2004-05-31 11:57:06 EDT
Verified improved performance in 20040529