Inline microtasks mean copying is noticible now
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: mgaudet, Assigned: mgaudet)
References
(Blocks 1 open bug)
Details
Attachments
(3 external files)
Since we have the inline microtask system, now copying is noticeable in some performance profiles. We can fix this by reducing the amount of copying we do through some gentle restructuring of APIs
| Assignee | ||
Comment 1•18 days ago
|
||
Avoid copying the now 7-word JS::MicroTask through temporaries when dequeuing
or peeking.
Add forms of JS::DequeueNextMicroTask, DequeueNextRegularMicroTask,
DequeueNextDebuggerMicroTask and PeekNextMicroTask that take a MutableHandle to
fill in place, and use them in the shell's job queue. The value-returning forms
remain until Gecko is converted.
| Assignee | ||
Comment 2•18 days ago
|
||
The batching drain loop copied each task through two temporaries on every
dequeue (into a MustConsumeMicroTask, then move-assigning that into the rooted
slot) and two on every peek. WontConsumeMicroTask has no move assignment, so
the RootedField initialization was a copy.
Make Gecko's DequeueNext*MicroTask and PeekNextMicroTask fill a rooted
MustConsumeMicroTask or WontConsumeMicroTask through a MutableHandle getter for
its task storage, so the only copy left is the one out of the queue element.
| Assignee | ||
Comment 3•18 days ago
|
||
All callers now fill rooted storage in place, so the forms that copy the task
out are unused.
Updated•17 days ago
|
Updated•17 days ago
|
Updated•17 days ago
|
| Assignee | ||
Updated•17 days ago
|
Comment 5•6 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/65ed80d5ffc6
https://hg.mozilla.org/mozilla-central/rev/f4a46007289e
https://hg.mozilla.org/mozilla-central/rev/f58cacb33ecb
Description
•