| Summary: | GroupingChecker.populateRoots() can take a very long time | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Kevan Miller <kevan.miller> | ||||||||||
| Component: | Framework | Assignee: | Thomas Watson <tjwatson> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | glyn.normington, jgawor | ||||||||||
| Version: | 3.6 | ||||||||||||
| Target Milestone: | 3.7 M6 | ||||||||||||
| Hardware: | Macintosh | ||||||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||||||
| Whiteboard: | |||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 337371 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Kevan Miller
Created attachment 189093 [details]
3.6.2+ patch
Here is a 3.6.2+ patch. I will attach a separate patch against HEAD for 3.7.
The issue is we re-calculate the class space (in GroupingChecker.populateRoots) for a bundle each time that bundle has a dynamic package load request. This can be rather expensive if the bundle has lots of dependencies and is also doing lots of dynamic package imports.
This patch only calculates the full class space for a bundle once and then modifies the class space dynamically when new dynamic package wires are established. Before we simply recalculated the whole space so there was no need to dynamically update the space.
Created attachment 189094 [details]
3.6.2+ patch
The last patch neglected the case where dynamic imports were dynamically added by a weaver.
Created attachment 189096 [details]
3.7 patch
3.7 patch is more simple since the dynamic import code was restructured and simplified a bit to handle the weaving hook in OSGi R4.3.
Created attachment 189129 [details]
3.7 patch
Updated patch that applies to HEAD.
Patch released to HEAD. I will open another bug to consider releasing to 3.6.2+ |