Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 348816

Summary: Slow IR creation with IBM JRE
Product: z_Archived Reporter: Justin Spadea <jspadea>
Component: EDTAssignee: Project Inbox <edt.mofmodel-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
file demonstrating slow build times none

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