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

Bug 351438

Summary: performance problems with ExportedPackageImpl constructor
Product: [Eclipse Project] Equinox Reporter: Thomas Watson <tjwatson>
Component: FrameworkAssignee: Thomas Watson <tjwatson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jgawor, jwross, kevan.miller, sjlee0, tjwatson
Version: 3.7   
Target Milestone: 3.7.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 351258    
Bug Blocks:    

Description Thomas Watson CLA 2011-07-07 08:40:38 EDT
Consider backporting performance fix to 3.7.1.

+++ This bug was initially created as a clone of Bug #351258 +++

Build Identifier: 3.7

The ExportedPackageImpl constructor, which gets called numerous times in most of the package admin service, is one of the top performance hotspots.

During the constructor call, Version.toString() is called. Even after Version.toString() is optimized (324331), this remains a hotspot, as it seems that Version objects don't seem to be reused, thus negating the benefit of the Version.toString() optimization.

The specVersion computation doesn't appear to be a central operation in ExportedPackageImpl, and yet each constructor call incurs a call to Version.toString().

I tried out a change where specVersion is lazily computed (computed only if getSpecVersion() is called), and that leads to a *substantial* performance improvement. Would it be possible to have this fixed and optimized that way? I can provide a patch if needed. Thanks!


Reproducible: Always