Closed Bug 1597728 Opened 4 years ago Closed 4 years ago

Templatize EventQueue to allow us to use different Queue sizes for different EventQueues

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: jesup, Assigned: jesup)

References

Details

Attachments

(1 file)

Small Queue sizes save us memory, but for specific (busy) queues increase the chance that we'll fill up the first page/buffer and be forced into a list of buffers temporarily. This is especially the case for MainThread Input and Normal queues. The solution is to make EventQueue be templatized to allow us to vary the page size.

For perf, we want to keep the EventQueue references to final classes. The simplest way to handle this was to make an templatized EventQueueInternal, and then have EventQueue (which defaults the queue size to 16) and EventQueueSized<size> which lets us use larger values for MainThread's Input and Normal queues.

Most event queues don't ever get many events queued at one time, but the
MainThread Input and Normal queues may.

Depends on D53911

Pushed by rjesup@wgate.com:
https://hg.mozilla.org/integration/autoland/rev/9de70fa39f66
Make EventQueue support templatization for queue page size r=froydnj
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: