Based on the latest Jason investigation,
This page is loading a multiple MB script which contains a single array with tons of literals and a few variables, which prevent us from using the fast-path for JSOP_OBJECT creation, but go through the slow-path of generating JSOP_INITELEM.
var a = 1;
var b = 2;
var arr = [1,2,3,4,5,6,7,8,9,0, a ,1,2,3,4,5,6,7,8,9,0, b ,1,2,3,4,5,6,7,8,9,0];
2 potential approaches:
- It sounds that this is the kind of values where we could use the constant propagation of the parser to figure out the a & b variables.
- Another option is to initialize the JSOP_OBJECT case, and only emit JSOP_INITELEM for the few variables cases which are detected while parsing.
Jason, does any sounds like something easy to do?