Bug 110485 - Improve performance of Service & ExecutionStrategy
Summary: Improve performance of Service & ExecutionStrategy
Status: CLOSED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal
Target Milestone: ---   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, performance
Depends on:
Blocks: 110489 110635
  Show dependency tree
 
Reported: 2005-09-23 15:16 EDT by Keith W. Campbell CLA
Modified: 2010-07-19 21:54 EDT (History)
0 users

See Also:


Attachments
proposed patch (19.22 KB, patch)
2005-09-23 15:17 EDT, Keith W. Campbell CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith W. Campbell CLA 2005-09-23 15:16:37 EDT
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().
Comment 1 Keith W. Campbell CLA 2005-09-23 15:17:21 EDT
Created attachment 27461 [details]
proposed patch
Comment 2 Anthony Hunter CLA 2005-10-04 15:40:39 EDT
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
Comment 3 Anthony Hunter CLA 2005-10-04 15:50:38 EDT
Closed
Comment 4 Eclipse Webmaster CLA 2010-07-19 21:54:43 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Common was the original product and component for this bug