Bug 49743 - performance improvements for runtime library
Summary: performance improvements for runtime library
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 1.2.1   Edit
Assignee: Matthew Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-08 17:37 EST by Martin Lippert CLA
Modified: 2004-10-21 04:31 EDT (History)
1 user (show)

See Also:


Attachments
toString caching (17.35 KB, application/octet-stream)
2004-08-24 10:54 EDT, Matthew Webster CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Lippert CLA 2004-01-08 17:37:54 EST
I am heavily using the runtime signature information from
thisJoinPoint.getSignature() and the toString() method of it. This causes heavy
String operations each time the toString method is called. Would it be possible
to cache the resulting string for example in MethodSignatureImpl and similar
classes for other signatures?
Comment 1 Jim Hugunin CLA 2004-01-14 11:50:31 EST
We will try to do this change after the benchmark suite is implemented so we 
will have a better grasp on the runtime performance gain and the static memory 
usage overhead of the change.
Comment 2 Adrian Colyer CLA 2004-08-10 04:32:49 EDT
Matthew, do we have a suite to understand the possible footprint / performance 
trade-offs here? If this enhancement makes sense under test, then let's put it 
in...
Comment 3 Matthew Webster CLA 2004-08-13 12:43:43 EDT
The "toString()" cache will add a new reference to every Signature object. 
There are concerns about footprint in large systems: bug 59076. Therefore the 
reference must be shared by each of the toString implementations: short, 
middle, long. Also the cache must be soft so that GC can collect the String 
when no need.

We should also endeavour to make this feature footprint-neutral by saving some 
memory elsewhere. Each SJP has a SourceLocation as well as a Signature. The 
column property is deprecated. Removing it and always returning -1 will save 
an "int".
Comment 4 Matthew Webster CLA 2004-08-24 10:54:07 EDT
Created attachment 14146 [details]
toString caching

1. For Signature objects the results of to/toShort/toLongString are cached
softly.
2. Simple testcase
3. Performance testcase
4. Redundant/deprecated "col" field removed from SourceLocation
Comment 5 Andrew Clement CLA 2004-09-01 06:35:04 EDT
Matthews code integrated.  I will close the bug when it is available in a build.
Comment 6 Andrew Clement CLA 2004-09-07 09:40:01 EDT
fix available:

BUILD COMPLETE -  build.371
Date of build: 09/07/2004 12:33:43
Time to build: 101 minutes 39 seconds
Last changed: 09/07/2004 11:47:45
Latest good AspectJ jar available at:
download.eclipse.org/technology/ajdt/dev/aspectj-DEVELOPMENT.jar
Comment 7 Adrian Colyer CLA 2004-10-21 04:31:02 EDT
Fix released as part of AspectJ 1.2.1