On Mon, May 2, 2016 at 9:58 PM, Boris Zbarsky <bzbar...@mit.edu> wrote: > For a 900KB stack (what we have on Windows, per > <http://mxr.mozilla.org/mozilla-central/source/js/xpconnect/src/XPCJSRuntime.cpp#3440>) > 512 DOM nodes deep corresponds to ~2KB per DOM node. 200 deep corresponds > to 5KB. > > Now quick, tell me how much stack space MSVC with PGO is using for the > combination of ElementRestyler::Restyle and ElementRestyler::RestyleChildren > and ElementRestyler::RestyleContentChildren (which is the unit of recursive > work when recalculating styles down the tree). How much stack space will it > use with the next MSVC release? How much stack space will it use if we > change the ElementRestyler struct some (note that this goes on the stack > before the Restyle() call on it)? > > The answer at least for me is that I don't know. But I bet it's quite > specific to particular code paths and compilers....
Sure. The same is potentially true if the stack depth limit is 200. Did anyone do all these calculations to determine that was safe, or did they just pick a number and see what worked? By your logic, maybe the next compiler version will use more stack space and suddenly we'll start crashing at 200 nodes deep also. If people are concerned about the possibility that a few weird pages that are already broken might crash, and nobody wants to do the work to check this, maybe Chrome (and Safari?) are willing to reduce their limit to 200. I don't see why they'd object. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform