Community
Participate
Working Groups
Discovered whilst working with Steve Ash on a build of a few projects that was consuming more than 2Gigs of heap. To recover memory Steve activated type demotion. This didn't appear to help much. This was due to Steve's projects using aspectpath. The aspectpath scanning to discover aspects was inadvertently making any types discovered on the aspectpath permanent types (not expendable) and they'd never be demoted/evicted. The types were all being made permanent in case they were an aspect but never being demoted if it turns out they were not. In a Roo petclinic I added spel as a dependency (on the aspectpath) and parsed a simple expression (just to further exaggerate the problem). This was leaving 213 types in the fixed area of the typemap. By correctly scanning aspectpath and demoting non-aspects this was reduced to 90.
fix is to demote them immediately if they are not an aspect. Also observed is that array types of anything are considered permanent - whether it is String[] or ThisIsGoingToBeWoven[] they are all inserted in the fixed map, we should stop that. However, we may still want to keep primitive arrays int[]/etc in the map.
ok - final changes are in. primitive arrays are anchored (in addition to primitives), like [[I for example.