Community
Participate
Working Groups
Attached is a patch to improve the performance and usability of the Service framework. ExecutionStrategy For loops use integer indexing rather than iterators. Service Inlined uses of final ProviderDescriptor.getElement() Removed unnecessary calls to String.valueOf(Object). Added convenience method to simplify configuration of most services. public void configureProviders(String namespace, String extensionPointName) Changed implementation of providers field. An array is indexed by priority ordinal replaces the more expensive HashMap keyed by priority. Renamed cacheSize to priorityCount to reflect its more general use. Nest adding providers in a try/finally block to prevent failures of one provider from affecting others. Improved readability of tracing messages. Compute size of list required in getAllProviders() to avoid extra allocations and copying or waste if the default size is incorrect. Inlined uses of final methods isOptimized() and isOptimistic().
Created attachment 27461 [details] proposed patch
Applied the patch and ran the JUnit tests. Launching org.eclipse.gmf.tests.runtime.common.core OK, Runs: 56, Fails: 0, Errors: 0, org.eclipse.gmf.tests.runtime.common.core, Time: 10.358
Closed
[GMF Restructure] Bug 319140 : product GMF and component Runtime Common was the original product and component for this bug