IPC messages starve XPCOM timers in child processes

RESOLVED FIXED in mozilla17

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: cjones, Assigned: cjones)

Tracking

unspecified
mozilla17
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [LOE:M])

Attachments

(1 attachment, 3 obsolete attachments)

With bug 774988 resolved, repaints on OOP content being bombed with IPC messages (input events) are still starved.  The remaining problems are most likely due to timers being starved; see bug 761933 comment 26.
This probably affects all XPCOM events, not just timers.
Whiteboard: [LOE:M]
This fixes the perf problems in bug 761933.
Assignee: nobody → jones.chris.g
Summary: IPC messages starve XPCOM timers → IPC messages starve XPCOM timers in child processes
Posted patch First attempt at a real fix (obsolete) — Splinter Review
I hoped that sorta-kinda-but-not-really-fair event dispatch would be good enough, but it's not.  This patch is still miles better than what's current in m-c, but it's 14fps slower on homescreen panning than the hacky patch that actually dispatches timers vs. IPC fairly.

Fiddlesticks.
Babies are crying everywhere.
Attachment #654545 - Attachment is obsolete: true
Attachment #654963 - Attachment is obsolete: true
Attachment #655101 - Attachment is obsolete: true
Attachment #655138 - Flags: review?(bent.mozilla)
Comment on attachment 655138 [details] [diff] [review]
Ensure that Tasks and XPCOM events are dispatched with the same priority

Review of attachment 655138 [details] [diff] [review]:
-----------------------------------------------------------------

Glad this was a simple fix!

::: ipc/glue/MessagePump.cpp
@@ +210,5 @@
>  #endif
> +
> +  // We can get to this point in startup with Tasks in our loop's
> +  // incoming_queue_ or pending_queue_, but without a matching
> +  // DoWorkRunnable().  In MessagePump::Run() above, we sensitivitely

Nit: Let's use a real word instead of "sensitivitely".
Attachment #655138 - Flags: review?(bent.mozilla) → review+
(In reply to ben turner [:bent] from comment #6)
> Comment on attachment 655138 [details] [diff] [review]
> Ensure that Tasks and XPCOM events are dispatched with the same priority
> 
> Review of attachment 655138 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Glad this was a simple fix!
> 
> ::: ipc/glue/MessagePump.cpp
> @@ +210,5 @@
> >  #endif
> > +
> > +  // We can get to this point in startup with Tasks in our loop's
> > +  // incoming_queue_ or pending_queue_, but without a matching
> > +  // DoWorkRunnable().  In MessagePump::Run() above, we sensitivitely
> 
> Nit: Let's use a real word instead of "sensitivitely".

Fixed.  Also s/enqueue/enqueued/ below.
Flags: in-testsuite-
++ryan
https://hg.mozilla.org/mozilla-central/rev/779bdf71cde5
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Duplicate of this bug: 784441
You need to log in before you can comment on or make changes to this bug.