Community
Participate
Working Groups
I have a patch that improves the space and time characteristics of AbstractProviderConfiguration. The hilights follow. + Merged isAssignableTable and isNotAssignableTable into assignableMap. This reduces the space required to cache whether classes are assignable to named types. Fewer operations are required to query or update the new map. As well we only gather information about classes directly given to isAssignableTo(); this avoids the space wasted by caching information about interfaces and other classes that are not of interest to clients of the API. + Inlined behavior of classes ClassToMethodSignaturesSetMap and ClassToMethodSignatureToMethodCach into a single map (methodCache) in ObjectDescriptor. This reduces the number of classes and objects required and improves performance as above as there is now a single path to discover a method or that it does not exist. + Changed type of ObjectDescriptor.methods and ObjectDescriptor.staticMethods to MethodValueEntry[]. This eliminates two objects per descriptor, eliminates frequent casts and improves performance. + Fix possible NullPointerException in ObjectDescriptor.sameAs() if parameter is null. + Refactored execution into MethodDescriptor and StaticMethodDescriptor reducing need for recursion and eliminating many casts. + Introduced SimpleParser to aid in parsing method and value descriptors. + Removed MethodDescriptor.parameters it was only used within the constructor. + Changed MethodDescriptor.signature to that it refers to an instance of a new class that is more space- and time-efficient than a string representation of the method's signature. + Refactored the constructors of MethodDescriptor and StaticMethodDescriptor to eliminate much common code which now lives in setParameterAndType(). + Removed many unused getters and setters. Then removed unused fields. + Avoid cloning parameterObjects in StaticMethodDescriptor when there are no 'contest' parameters? + Merged ValueDescriptor.valueLiterals and ValueDescriptor.notValueLiterals into a single map (valueMap) requiring at most one lookup in sameAs() and reducing the number of objects. Collections.singletonMap is used in the common case where this exactly one value. + Changed type of ValueDescriptor.valueObjects and ValueDescriptor.notValueObjects to ObjectDescriptor[]. This eliminates two objects per descriptor, eliminates frequent casts and improves performance. + Merged successLookupTable and failureLookupTable into a single map (loadedClassMap) reducing the number of lookups required in loadClass() and reducing the number of objects. We also avoid constructing the large String keys and instead use the existing class name and plugin id.
Created attachment 31469 [details] proposed patch
Added 'performance' keyword.
due to the amount of changes in this patch, i think it should be push to 2.0 unless we have concrete numbers showing big impact on performance
Moving to the next release, GMF 2.1.
[GMF Restructure] Bug 319140 : product GMF and component Runtime was the original product and component for this bug