CallSetup should interact with the GC more efficiently.
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
People
(Reporter: mgaudet, Unassigned)
Details
Attachments
(1 file)
Basically, Rooting while cheap, isn't free. CallSetup contains 3 Rooted
fields, and is often used around a 4th.
There are some options for fixing this, but none quite so simple that it's trivial for me to do otherwise this would have a patch attached already.
Option 1: Replace Rooted with RootedTuple and RootedField. We've done this in the engine for helpers and seen a 5% improvement on a subtest of JetStream3.
This comes at a slight cost however of adding a new member to CallSetup; the gymnastics required to maintain the mozilla::Maybe rig that exists here.
Option 2: Root CallSetup and add a trace function. I'd actually strongly prefer this, but the setup story for CallSetup is very awkward because it wants to do some pre-flight checks before trying for a JSContext. I soft of would love it if there was a way for us to have a JSContext around for CallSetup or to split the preflight checks.
Opening this bug for discussion.
Reporter | ||
Comment 1•5 days ago
|
||
Comment 2•3 days ago
|
||
I don't know what is awkward in CallSetup (seems quite ok, given what the platform requires), but both 1 and 2 feel ok to me.
(RootedTuple is a bit ugly, since RootedField takes then some magical numbers, but perhaps that is fine.)
Description
•