Closed
Bug 1850115
Opened 1 year ago
Closed 9 months ago
Stop using IdToFunctionName in hot code
Categories
(Core :: JavaScript Engine, task, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 1858040
People
(Reporter: arai, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Whiteboard: [sp3])
while looking into bug 1846110 with bug 1848278 patch applied, I spotted that IdToFunctionName
takes some amount of time in CreateInterfaceObject
.
static bool DefineAccessorPropertyById(JSContext* cx, JS::Handle<JSObject*> obj,
...
IdToFunctionName(cx, id, FunctionPrefixKind::Get));
...
IdToFunctionName(cx, id, FunctionPrefixKind::Set));
the property name itself can be defined with the extended-known atom, but the accessor names need "get "
and "set "
prefixes, and it's not represented in the JSPropertySpec
, which means we perform StringBuffer
operations and atomization there.
maybe we can have special extension to pre-atomize accessor names and point them from JSPropertySpec
?
Reporter | ||
Comment 1•1 year ago
|
||
Some part can be solved by bug 1850115 and bug 1850344, which pre-calculates accessor names for interface objects.
Updated•1 year ago
|
Whiteboard: [sp3]
Updated•1 year ago
|
See Also: → https://mozilla-hub.atlassian.net/browse/SP3-534
Reporter | ||
Comment 2•9 months ago
|
||
This is solved by bug 1858040, which lazifies the accessor name calculation
You need to log in
before you can comment on or make changes to this bug.
Description
•