Summary: | optimizing method lookup | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Andrew Clement <aclement> |
Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P2 | ||
Version: | 1.6.6 | ||
Target Milestone: | 1.6.7 | ||
Hardware: | PC | ||
OS: | Windows NT | ||
Whiteboard: |
Description
Andrew Clement
2009-10-28 17:25:03 EDT
benefits here will be: - reduce memory usage - reduced resolution (some supertypes may never be chased down and resolved) - faster lookup for the common case of the type we are looking at containing the member Right, the iterator still has a bug in it - but I'm developing some tests so I can properly explore it (can't believe this bit of code never had unit tests). The primary bug appears to be that when using the iterator the methods directly on the type being asked about are returned *twice*. Whoops! Gotta love testing. Now found a bug in the replacement code we are using instead of the buggy code... it adds the methods from Object multiple times - this won't cause a failure but will slow things down and use more memory! this is turning into a bit of work... I'm also including other little enhancements here and there to speed things along and produce less transient garbage during matching. - NamePattern will now match '*' without converting the target it is matching against from String to char array - ThisOrTarget will match the common case of this(Object) very quickly, not calling into type pattern matching code. BcelObjectType - now holds a weak reference to the resolved superclass rather than resolving each time. ResolvedType.clearIntertypeMungers() - I wanted to change the 'new' to a 'clear()' but I can't as it introduces a ConcurrentModificationException (whilst iterating through the intertype mungers we call clearIntertypeMungers) - this is related to the faulting in of binary types. I don't want to investigate this now - but should do at some point - there is a test that fails which shows the problem, just change 'new' to clear and run the test suite did a massive amount of refactoring and enhancements under this bug report - see the blog for more info: http://andrewclement.blogspot.com/2009/11/aspectj-how-much-faster-is-aspectj-167.html |