RESOLVED FIXED 21962
AST uses way too much memory
https://bugs.webkit.org/show_bug.cgi?id=21962
Summary AST uses way too much memory
Geoffrey Garen
Reported 2008-10-29 16:24:24 PDT
2 possible solutions: 1. Throw away function ASTs right after parsing. Reparse when compiling to bytecode. Use an AST cache to reduce performance hit. 2. Parse function bodies just enough to determine they're syntactically valid. Parse for real the first time the function executes. Also * Eagerly compiling to bytecode might work if we shrink bytecode footprint; for now, it's even worse than AST footprint. * There's low-hanging fruit for reducing the size of AST nodes
Attachments
patch - remove LabelStack from AST (42.87 KB, patch)
2008-10-30 21:28 PDT, Geoffrey Garen
no flags
patch - remove reference count and symbol table from FunctionBodyNode (11.86 KB, patch)
2008-10-31 18:27 PDT, Geoffrey Garen
no flags
Geoffrey Garen
Comment 1 2008-10-30 21:28:34 PDT
Created attachment 24792 [details] patch - remove LabelStack from AST
Oliver Hunt
Comment 2 2008-10-30 21:31:09 PDT
Comment on attachment 24792 [details] patch - remove LabelStack from AST r=mw assuming perf is okay
Geoffrey Garen
Comment 3 2008-10-30 21:32:16 PDT
Geoffrey Garen
Comment 4 2008-10-31 13:00:08 PDT
Committed attachment 24792 [details] as revision 38047. I'll keep this bug open to monitor the rest of the work.
Geoffrey Garen
Comment 5 2008-10-31 18:27:49 PDT
Created attachment 24828 [details] patch - remove reference count and symbol table from FunctionBodyNode
Geoffrey Garen
Comment 6 2008-11-01 14:42:22 PDT
Comment on attachment 24828 [details] patch - remove reference count and symbol table from FunctionBodyNode Clearing the review flag because this patch turned out to be a performance regression. Maybe someone else can finish it off.
Geoffrey Garen
Comment 7 2008-11-15 14:35:53 PST
Comment on attachment 24792 [details] patch - remove LabelStack from AST Clearing review flag on landed patch.
Gavin Barraclough
Comment 8 2012-09-06 12:00:28 PDT
This was fixed in r38047
Note You need to log in before you can comment on or make changes to this bug.