
| Key: |
RVM-632
|
| Type: |
Improvement
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
Major
|
| Assignee: |
Ian Rogers
|
| Reporter: |
Ian Rogers
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
RVMClass has a final LinkedList called objectCache that is currently used to hold references to InterfaceMethodConflictResolver stubs. As many classes don't implement interfaces, having a final LinkedList per RVMClass seems space inefficient. I'd propose the object cache perhaps be turned into a static global hashset, or that we're clever about how we populate the RVMClass objectCache. For example, initially objectCache could be null, if one item is added it could just reference that item then when more items are added an array or linked list could be created. I imagine the size of the cache the majority of the time is 0 and occasionally it is 1, with very infrequently it being 2 or more.
Using data from the boot image write of a prototype build: there are 1190 RVMClasses and 1190 linked lists, there are only 216 linked list elements, therefore more than 800 linked lists are empty.
|
|
Description
|
RVMClass has a final LinkedList called objectCache that is currently used to hold references to InterfaceMethodConflictResolver stubs. As many classes don't implement interfaces, having a final LinkedList per RVMClass seems space inefficient. I'd propose the object cache perhaps be turned into a static global hashset, or that we're clever about how we populate the RVMClass objectCache. For example, initially objectCache could be null, if one item is added it could just reference that item then when more items are added an array or linked list could be created. I imagine the size of the cache the majority of the time is 0 and occasionally it is 1, with very infrequently it being 2 or more.
Using data from the boot image write of a prototype build: there are 1190 RVMClasses and 1190 linked lists, there are only 216 linked list elements, therefore more than 800 linked lists are empty. |
Show » |
|