It's a little tricky to estimate. This patch eliminates calls to the add property hook after the first one, but the first one is the expensive one anyway. On the other hand, it also lets us use faster paths for subsequent addprops, which is hard to measure without just writing the patch. To some extent, the improvement depends on the fraction of wrapper objects that have more than one property added. As a rough estimate: the samples in that profile inside `nsWrapperCache::PreserveWrapper` are mostly still necessary. Dropping the two implementations of that function leaves 174/500 samples. I would hope for the fix to eliminate a solid chunk of those samples. The amount of code left to be written is relatively small. Mostly I just need to find time to talk to a DOM person about making the DOM-side code of my prototype less criminal.
Bug 1844878 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
It's a little tricky to estimate. This patch eliminates calls to the add property hook after the first one, but the first one is the expensive one anyway. On the other hand, it also lets us use faster paths for subsequent addprops, which is hard to measure without just writing the patch. To some extent, the improvement depends on the fraction of wrapper objects that have more than one property added. As a rough estimate: the samples in that profile inside `nsWrapperCache::PreserveWrapper` are mostly still necessary (except for the `if (PreservingWrapper()) return;` part, which I'm assuming is trivial). Dropping the two implementations of that function leaves 174/500 samples. I would hope for the fix to eliminate a solid chunk of those samples. The amount of code left to be written is relatively small. Mostly I just need to find time to talk to a DOM person about making the DOM-side code of my prototype less criminal.