Community
Participate
Working Groups
Inside the new "org.eclipse.e4.ui.workbench" bundle there are still some calls to the now deprecated "org.osgi.service.packageadmin.PackageAdmin". I think that newly implemented bundles shouldn't use old and deprecated APIs. If the team is fine with this idea, I would like to provide a Gerrit-Patch.
+1 for replacing deprecated API calls. I have not looked into this in detail but from a first glace the new API looks relatively verbose: http://www.eclipse.org/forums/index.php/mv/msg/205719/1075453/#msg_1075453 Rene, I suggest you replace one call with the new API and we see what Paul says to the change.
I'm open to this kind of change, but as Lars mentions we should see an example of replacing one of our uses. PW
I finally found the time to make a gerrit commit which entirely removes the PackageAdmin calls from the “org.eclipse.e4.ui.workbench”. As I mentioned in a comment inside the code there is a small performance loss with the new solution inside of the “topoSort” method, because of some “class-loading breaks”. Nobody used BundleWiring so far and so my topoSort implementation has to take the burden to do the loading of all the required BundleWiring-Classes. That's way it loses some time ;-( . But if the BundleWiring-classes were already loaded it will beat the old topoSort. Here are some measurements on my machine: old topoSort: ~3ms new topoSort: ~4ms ;-( new topoSort but the BundleWiring-classes are already loaded: ~1ms So I hope that more people will remove their PackageAdmin dependencies in favor of the OSGi Wiring-Framework and so the new topoSort can shine with its performance. Gerrit-Commit: https://git.eclipse.org/r/#/c/17772/
Tom, I'm not so familiar with the new wiring package that replaces PackageAdmin. Could you please give https://git.eclipse.org/r/#/c/17772/ a quick review? It looks reasonable to me. PW
Hi, I finally adapted the code to also resolve the re-Exports as it is done in the old topoSort, but the resolving via BundleWiring is really slow (about 5 times slower than the PackageAdmin; all the time is lost in the new ModelAssembler#resolveReExports). So I think thats not the way to go, I hope that someone of you can give me a hint on how to boost the performance. BTW, the processModel() method is not very dynamic aware is this really wanted? Because I thought about an idea which uses an ExtensionTracker and a way which contributes to the model dynamically. Which means add the fragment to the model if possible. If it can't be added because the model element to which it wants to contribute doesn't exist so far (= the need for the topoSort), it will be kept outside of the model until it becomes available. Regards René
(In reply to René Brandstetter from comment #5) > Hi, > > I finally adapted the code to also resolve the re-Exports as it is done in > the old topoSort, but the resolving via BundleWiring is really slow (about 5 > times slower than the PackageAdmin; all the time is lost in the new > ModelAssembler#resolveReExports). So I think thats not the way to go, I hope > that someone of you can give me a hint on how to boost the performance. > > BTW, the processModel() method is not very dynamic aware is this really > wanted? Because I thought about an idea which uses an ExtensionTracker and a > way which contributes to the model dynamically. Which means add the fragment > to the model if possible. If it can't be added because the model element to > which it wants to contribute doesn't exist so far (= the need for the > topoSort), it will be kept outside of the model until it becomes available. > > Regards > René Any updates Tom / Paul?
I think it's my fault that both didn't check the current gerrit review, because I only put my comments on gerrit and not into this bug. So here a small update on the current state: The topoSort method is now as fast as the deprecated PackageAdminImpl, because the 3.10 equinox environment has performance improvement in the wiring stuff and the PackageAdminImpl implementation also switched to bundlewiring. So I just copied the implementation from there ;-)
Fixed with https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=02523c9397a80075c73124b6f488cd2e07322166
(In reply to René Brandstetter from comment #7) > I think it's my fault that both didn't check the current gerrit review, > because I only put my comments on gerrit and not into this bug. So here a > small update on the current state: The topoSort method is now as fast as the > deprecated PackageAdminImpl, because the 3.10 equinox environment has > performance improvement in the wiring stuff and the PackageAdminImpl > implementation also switched to bundlewiring. So I just copied the > implementation from there ;-) Just to be clear, none of this was your fault. The unresponsiveness was completely from my end. I thank you for your contribution and I apologize for taking so long to review your changes. Thanks to Lars for giving me a kick during the hackathon at eclipse con to do the review.
ModelAssembler still works correctly AFAICS. Thanks again Rene!
Tested with Build id: I20140402-0100