DescriptionParsing especially large nested functions takes up more memory than necessary.
Inner functions must be eagerly parsed for scope analysis, but the full AST is
also kept around even though it's not needed.
This CL mitigates this problem by allocating some AstNodes of the inner function
to a temporary Zone which is deallocated once the scope information has been
built. The remaining nodes (such as VariableProxy) must persist until scope
analysis actually happens, and have to be allocated to a parser-persistent Zone.
BUG=417697
LOG=N
Committed: https://crrev.com/33ec0b79b8ea60dcccf1d445b0cbd2eed8e1a165
Cr-Commit-Position: refs/heads/master@{#30685}
Patch Set 1 #Patch Set 2 : fix FunctionExpression oversight, allocate more to temp zone #Patch Set 3 : Disable temp allocation of the FunctionExpression object until I can work out FunctionNameInferrer #
Total comments: 2
Patch Set 4 : cl feedback #
Total comments: 2
Patch Set 5 : cl feedback 2 #Patch Set 6 : wrap the temporary zone stuff in its own scope #
Total comments: 2
Patch Set 7 : get terminology less wrong in comments #
Messages
Total messages: 17 (7 generated)
|