Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343045 - [compiler][smap] improve performance of smap generation
Summary: [compiler][smap] improve performance of smap generation
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 0.8   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: 0.8 M7   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-16 12:29 EDT by Stephan Herrmann CLA
Modified: 2011-04-30 16:09 EDT (History)
0 users

See Also:


Attachments
proposed fix and test adjustments (23.67 KB, patch)
2011-04-16 12:40 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2011-04-16 12:29:32 EDT
When compiling large teams like, e.g.,
   org.eclipse.objectteams.internal.jdt.nullity.CompilerAdaptation
it can be observed that around 40% of the compilation time is spent in
generating the JSR-045 SMAPs, thus degrading the overall experience.
Comment 1 Stephan Herrmann CLA 2011-04-16 12:40:30 EDT
Created attachment 193419 [details]
proposed fix and test adjustments

The performance issue could be narrowed down to one specific loop
inside RoleSmapGenerator.fillSmap, where all line numbers of a source 
file are added to a FileInfo and to a LineInfoReminder. The check
LineInfoReminder.existsLineInfoFor looks a bit expensive.

At a closer look we were adding way too many line infos. For a role inside
a large team only the role's line number should be added not the whole
source file (= the team).

The patch fixes this and with this the effort of generating the SMAPs
could be reduced from around 40% to around 1%!

The patch also adjusts the test correspondingly.

This needs verification in real world debugging, once we have a new build.
Comment 2 Stephan Herrmann CLA 2011-04-16 12:44:04 EDT
Patch committed as r1435,6, awaiting verification.
Comment 3 Stephan Herrmann CLA 2011-04-17 15:36:01 EDT
Debugging works as before, marking this issue as fixed.
Comment 4 Stephan Herrmann CLA 2011-04-30 16:09:32 EDT
Verified for 0.8M7 using build 201104300913