I refactored things a little in the SWF10 back end, so that it compiles one
chunk of script at a time, basically like the
swf8 compiler does. However, memory usage is still high, and one of the
culprits seems to be a global table of
class definition AST objects.

I'm running an IBM memory analyzer tool on snapshots of the heap from the
lzx compiler, and it is reporting what looks like
a lot of memory is being held in the SWF9Generator in a hash table, which is
holding ASTClassDefinition objects.

I think this is the "classes" instance var in SWF9Generator that is holding
all these objects.

Each ASTClassDefinition has a subtree and seems to take about 256K - 512K
bytes,and there are thousands of these
class defs, so that is holding 512 MB at least of heap.

Is there any way we can compress this info so that we don't keep the whole
AST trees around? It seems like we just
need the detailed  superclass info for creating interstitial classes, and
maybe we could do that without retaining the
whole parse tree for the class?



-- 
Henry Minsky
Software Architect
[email protected]

Reply via email to