Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338582 - consider optimization by avoiding the role cache
Summary: consider optimization by avoiding the role cache
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 0.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 0.8 M6   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2011-03-01 15:07 EST by Stephan Herrmann CLA
Modified: 2011-04-30 20:14 EDT (History)
0 users

See Also:


Attachments
proposed implementation (41.23 KB, patch)
2011-03-10 12:46 EST, 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-03-01 15:07:23 EST
As posted in http://www.eclipse.org/forums/index.php?t=msg&th=205390
we should consider a possible optimization that can be achieved by 
simply avoiding use of the internal cache for specific role classes 
where state and role identity are irrelevant.
Comment 1 Stephan Herrmann CLA 2011-03-10 12:46:52 EST
Created attachment 190886 [details]
proposed implementation

This patch implements the instantiation policy ALWAYS.
We already prepare for supporting more instantiation policies,
but only ONDEMAND and ALWAYS are currently implemented.

I might mention that for ALWAYS we still generate the role cache,
which is a tiny bit of waste, but not generating it would require
more changes to ensure no-one attempts to access the inexistent cache.

The patch also contains the proposed changes to the OTJLD.
Comment 2 Stephan Herrmann CLA 2011-04-16 15:29:00 EDT
Marking as fixed after I could observe >20% speedup in the jdtnullity plug-in.

If other levels beside ONDEMAND and ALWAYS are desired I will open separate bugs.
Comment 3 Stephan Herrmann CLA 2011-04-30 18:52:21 EDT
Verified for 0.8M6 (sic)  using build 201104300913

note 1: this was already shipped with M6 but never verified at that time
note 2: the speed-ups may be lower than reported in comment 2,
   today (on a different machine) I observed approx 5-10% speed-up