Reserve CompilationAtomCache.atoms before instantiation
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
growStorageBy
for CompilationAtomCache.atoms
takes some amount of time while instantiation.
the maximum storage size is known (not-well-known-nor-short atoms in ParserAtomsTable
).
so we can reserve the vector, especially off main thread, to shorten the time taken by instantiation on main thread.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
parserAtoms.entrySet_.count()
isn't appropriate size to reserve, given that it includes atoms inside lazy functions.
maybe we can add another pass to off-thread task to count atoms that will be converted to JSAtoms
Assignee | ||
Comment 2•4 years ago
|
||
This adds ParserAtoms now has marked_
field, and preparation step for
stencil instantiation.
At this point, the prepration step is optional, and it's performed only on
off-thread task, to perform part of instantiation off main thread.
In the preparation step, all atoms that will be used while instantiation will
be marked, and CompilationAtomCache.atoms is reserved with the number of marked
atoms.
Bug 1672105 will utilize the field and the preparation step to centralize atom
instantiation.
Comment 4•4 years ago
|
||
bugherder |
Description
•