Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348816 - Slow IR creation with IBM JRE
Summary: Slow IR creation with IBM JRE
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-08 17:41 EDT by Justin Spadea CLA
Modified: 2017-02-23 14:14 EST (History)
1 user (show)

See Also:


Attachments
file demonstrating slow build times (2.20 KB, application/octet-stream)
2011-06-08 17:41 EDT, Justin Spadea CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Spadea CLA 2011-06-08 17:41:08 EDT
I spent some time digging around why builds were taking so long, and pinpointed it to DynamicEClass.getClazz(). I've attached an egl file as an example. When using an IBM JRE 1.6, I get results as follows (all times in milliseconds):

Time spent in getClazz(): 1430, total time creating IR: 1692

When switching to Sun 1.6, it's much faster:

Time spent in getClazz(): 28, total time creating IR: 306


It looks like the EGL_Location annotation goes through this code, and every element has this annotation, causing the function to be invoked many, many times. This is why I put so many dummy statements in the example file. The more statements you add, the bigger this gap between JREs.

This needs to be sped up - building a relatively small project can take a couple minutes.
Comment 1 Justin Spadea CLA 2011-06-08 17:41:49 EDT
Created attachment 197651 [details]
file demonstrating slow build times
Comment 2 Paul Harmon CLA 2011-06-13 17:10:39 EDT
I have fixed this with a simple change to MofLookupDelegate. The code was previously saving the DynamicEClass object that it created for each of the dynamic annotations into Environment.INSTANCE, instead of saving into the current environment.
Comment 3 Justin Spadea CLA 2011-07-05 11:40:22 EDT
Verified in latest CVS