Closed
Bug 1247979
Opened 8 years ago
Closed 8 years ago
scrolling-boxes is really slow with apz
Categories
(Core :: Layout, defect, P1)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
e10s | + | --- |
firefox45 | --- | unaffected |
firefox46 | --- | wontfix |
firefox47 | --- | fixed |
firefox48 | --- | verified |
People
(Reporter: jimm, Assigned: jrmuizel)
References
(Blocks 3 open bugs, )
Details
(Keywords: perf, Whiteboard: [gfx-noted])
Attachments
(3 files, 2 obsolete files)
1.71 KB,
patch
|
Details | Diff | Splinter Review | |
4.53 KB,
patch
|
Details | Diff | Splinter Review | |
14.94 KB,
application/x-zip-compressed
|
Details |
testcase: http://people.mozilla.org/~roc/scrolling-boxes.html <The_8472> speaking of performance, this is like 10x slower under e10s: http://people.mozilla.org/~roc/scrolling-boxes.html <RyanVM> 40x slower than Chrome on my system <RyanVM> and yeah, non-e10s is 4x slower than Chrome <RyanVM> it's APZ <chutten> but fixed backgrounds are the devil <jimm> sounds similar to bug 1242969 <RyanVM> e10s w/o APZ is basically the same (if not slightly faster) than non-e10s
Comment 1•8 years ago
|
||
We're doing a lot of repainting here and we probably shouldn't. Shrinking the displayport significantly speeds this up.
Blocks: apz-desktop, paint-fast
status-firefox45:
--- → unaffected
status-firefox46:
--- → affected
status-firefox47:
--- → affected
Component: Panning and Zooming → Layout
Keywords: perf
Whiteboard: [gfx-noted]
Comment 2•8 years ago
|
||
Profile at [1] (taken from Nightly, where the test takes about ~11 seconds vs ~1 second on Chrome). This is spending about 35% of the time in nsRegion::ScaleToOutsidePixels. Jeff, can that be pixman code be optimized any more? We might also be building some absurd region containing a ton of 10x10 rects and then doing region operations on it. [1] https://cleopatra.io/#report=2258ab3fc58453546fcbbe144826f43730b293e7
Flags: needinfo?(jmuizelaar)
Assignee | ||
Comment 3•8 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2) > Profile at [1] (taken from Nightly, where the test takes about ~11 seconds > vs ~1 second on Chrome). > > This is spending about 35% of the time in nsRegion::ScaleToOutsidePixels. > Jeff, can that be pixman code be optimized any more? We might also be > building some absurd region containing a ton of 10x10 rects and then doing > region operations on it. > > [1] https://cleopatra.io/#report=2258ab3fc58453546fcbbe144826f43730b293e7 ScaleToOutsidePixels can be optimized a lot. I will do so.
Flags: needinfo?(jmuizelaar)
Assignee | ||
Comment 4•8 years ago
|
||
This does a union of all the rectangles at once, instead of one-by-one. It also cuts down a lot on allocation churn. It would be possible to avoid an additional allocation/copy if we change the interface of this function to mutate the existing region instead of returning a new one. Note, I have not tested the correctness of this patch, but it should be ok.
Assignee | ||
Comment 5•8 years ago
|
||
Attachment #8718926 -
Attachment is obsolete: true
Comment 6•8 years ago
|
||
On my local debug build that patch improves performance on this page by ~28% (sample size of 1). We should get it landed and run another profile.
Assignee | ||
Comment 7•8 years ago
|
||
This keeps around a temporary nsRegion so that we can avoid modifying these regions in place. Modifying regions in place forces a new allocation and we'd rather not.
Assignee | ||
Comment 8•8 years ago
|
||
This time without other changes.
Assignee | ||
Updated•8 years ago
|
Attachment #8718957 -
Attachment is obsolete: true
Assignee | ||
Comment 9•8 years ago
|
||
Alternatively we could use AccumRegions for these regions. See bug 1248044.
Comment 11•8 years ago
|
||
Still slow with e10s. About 10.5 seconds.
Comment 12•8 years ago
|
||
NI on myself to get another profile once this is in a Nightly. I don't want to do an opt build locally.
Flags: needinfo?(bugmail.mozilla)
Keywords: leave-open
Comment 13•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/537dbc284408
Updated•8 years ago
|
Flags: needinfo?(bugmail.mozilla)
Comment 14•8 years ago
|
||
On the latest nightly on OS X for me it takes ~5700ms compared to Chrome's ~900ms. A huge improvement already. Here's a new profile: https://cleopatra.io/#report=aaf726c63fcbd881eac6de2c739e72fe5102628c - we're still spending a lot of time in pixman region operations, for example around 5.4% of time in PaintedLayerData::AccumulateEventRegions which is all in _moz_pixman_region32_union.
Comment 15•8 years ago
|
||
Actually that 5.4% goes up to like 22% if you look at a subset of the profile that includes many paints trims out the empty space on the beginning/end of the profile. Jeff, can you take a look at this profile and see if there is more that can be done?
Flags: needinfo?(jmuizelaar)
Assignee | ||
Comment 16•8 years ago
|
||
I expect that using the AccumRegions from bug 1248044 should help with the rest of the time. I'm on PTO this week but I can look at writing a patch the week after.
Flags: needinfo?(jmuizelaar)
Reporter | ||
Updated•8 years ago
|
Comment 18•8 years ago
|
||
Did somebody save this testcase locally? Roc's people is gone and he doesn't have a backup.
Comment 19•8 years ago
|
||
Comment 20•8 years ago
|
||
I'm nominating this to block APZ rollout, but that decision probably ultimately lives with Jeff (or maybe mbest). It's an artificial testcase but one that's likely to get attention.
Blocks: apz-desktop-blockers
Comment 21•8 years ago
|
||
Thanks for providing a copy of the test, Alice! I've uploaded it to my people account so it's easier for people to run.
Comment 22•8 years ago
|
||
Bug 1253860 fixes this bug; the test now takes comparable time to non-e10s. I ran it on March 10 nightly on my OS X machine 5 times in each of three configurations: Config no-e10s e10s+APZ e10s no-APZ Samples 1882 2233 1660 1824 1485 1350 1614 1478 1562 1977 1509 1465 1772 2111 1682 -------------------------------------------- Average 1813.8 1763.2 1543.8 -------------------------------------------- e10s without APZ is still faster, but e10s with APZ is still better than non-e10s so I call this a win. We can improve this further by making the event regions code faster; the win in bug 1253860 comes from skipping the display list building entirely when we can.
Status: NEW → RESOLVED
Closed: 8 years ago
Depends on: 1253860
Keywords: leave-open
Resolution: --- → FIXED
Updated•8 years ago
|
status-firefox48:
--- → fixed
Comment 23•8 years ago
|
||
The patch that landed here actually landed in 47 so updating flags according to that. However the bug as described "scrolling-boxes is really slow with APZ" isn't actually fixed in 47; it requires bug 1253860 to be really fixed. I hope leave-open dies in a fire.
Target Milestone: --- → mozilla47
Comment 24•8 years ago
|
||
I'm changing the target milestone to 48 as bug 1253860 is wontfix for 47. Verified as fixed using latest Aurora 48.0a2 under Win 7 64-bit and Mac OS X 10.9.5, the average I obtained was 1382ms under Win and 1115ms under Mac.
Target Milestone: mozilla47 → mozilla48
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•