Closed Bug 835641 Opened 7 years ago Closed 7 years ago

Lots of UpdateDimensions calls being sent

Categories

(Core :: General, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21
blocking-b2g tef+
Tracking Status
firefox19 --- wontfix
firefox20 --- wontfix
firefox21 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- fixed
b2g18-v1.0.1 --- fixed

People

(Reporter: cjones, Assigned: cjones)

References

Details

(Whiteboard: [FFOS_perf])

Attachments

(1 file)

I see flurries of 20 or so of these guys at a time while running with a logging patch applied.  This may be TabParent viewing inconsistent layout state.

All of the dimensions being sent must be the same, because there's no visual change.  Looks like a reflow triggered by the time changing or something.

We /should/ be smart enough to avoid reflow in the content process when the dimensions don't change, but that's a bit dangerous, and the overhead of sending the IPC's and waking up the various processes is not free either.

So we should cache dimensions in TabParent and skip forwarding these messages when possible.  We already cache part of the needed info.
Actually a lot of this is happening on a critical startup path.
Blocks: 834622
Going to confirm with my logging that this is actually having the intended effect ...
Assignee: nobody → jones.chris.g
Comment on attachment 707393 [details] [diff] [review]
Don't SendUpdateDimensions() when they haven't changed

It do.
Attachment #707393 - Flags: review?(roc)
Guys, this bug could be causing numerous spurious wakeups in content processes in some cases, which might be dinging power numbers.
Vasanth, can you please get an eng build to the power guys w/ this patch to see if this helps with some of the wake-ups they are seeing?
Flags: needinfo?(vasanth)
(--> elsewhere)
Flags: needinfo?(vasanth)
https://hg.mozilla.org/mozilla-central/rev/a24051aa1b46
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Chris, do we want to uplift that?
Comment on attachment 707393 [details] [diff] [review]
Don't SendUpdateDimensions() when they haven't changed

Yes.

This is a safe patch that removes unnecessary work from app startup and will prevent a lot of unnecessary process wakeups, which might be contributing to a power-usage problem.
Attachment #707393 - Flags: approval-mozilla-b2g18?
Attachment #707393 - Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
Should we land this on v1.0.0 too?
blocking-b2g: --- → tef?
(In reply to Michael Vines [:m1] [:evilmachines] from comment #12)
> Should we land this on v1.0.0 too?

Is this a blocker for you? If so, then we'll tef+.
Yes please, based on comment 10
blocking-b2g: tef? → tef+
Attachment #707393 - Flags: checkin?(ryanvm)
Attachment #707393 - Flags: checkin?(ryanvm)
You need to log in before you can comment on or make changes to this bug.