Community
Participate
Working Groups
Created attachment 194410 [details] work in progress + performance tests org.eclipse.equinox.internal.region.StandardRegionDigraph.getRegion(long) performs a linear search over all regions to find the region a bundle belongs to. This causes significant slow down for resolve, bundle, service operations. For example, simply having 100 regions created shows about 4x slowdown in performance of getBundles methods. I think we need to consider hashing the Bundle->Region relationship similar to how we hashed the Region->Edges relationship. The attached patch does this. It also has some performance tests that show the slow down. In order to run the performance tests you need the following project org.eclipse.core.tests.harness at http://dev.eclipse.org/viewsvn/viewvc.cgi/org.eclipse.core.tests.harness/ Glyn, please take a look. The patch adds a new global map to digraph that all regions must use to record the Bundle->Region map.
I forgot that you also need org.eclipse.test.performance: http://dev.eclipse.org/viewsvn/viewvc.cgi/org.eclipse.test.performance/
Created attachment 194541 [details] updated patch and tests Here is an updated patch. I decided to remove the ConcurrentMap used to keep the set of bundle ids that belong to a region. This could potentially make Region.getBundle(String, Version) slower, but I don't think that is a method that gets called very much (if at all).
I released this last patch.