Closed Bug 1218558 Opened 9 years ago Closed 1 year ago

A lot of Recalculate Style events causing jank with non-APZ scrolling on specific page

Categories

(Core :: Layout, defect)

x86_64
Windows 8.1
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: nissan4321, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20151025030428

Steps to reproduce:

1) Enter http://wp.ansergy.com/?page_id=3206
2) Try scrolling the page with APZ scrolling with the wheel on e10s
3) Observe a jerky scrolling

A profile recording shows a lot of "Recalculate Style" events fired continuously when scrolling the page with APZ which can explain the scrolling not hitting 60FPS.


Actual results:

Auto scrolling with APZ scrolling on e10s not hitting 60 FPS.


Expected results:

Auto scrolling with APZ should have hit 60 FPS.
Component: Untriaged → General
OS: Unspecified → Windows 8.1
Hardware: Unspecified → x86_64
With APZ style recalculations should not be limiting the framerate. The profile that you captured - was that using the devtools profiler or the Gecko profiler? If the former, would you be able to get a profile using the Gecko profiler? That will tell us what the compositor thread is doing, and why it's not able to keep up at 60 FPS.
Flags: needinfo?(nissan4321)
Attached file GeckoProfile (deleted) —
The profile I captured was using the DevTools profiles.

Attaching the Gecko profile while scrolling the page with APZ up and down continuously.
Flags: needinfo?(nissan4321)
Unfortunately the profile doesn't have the compositor thread and is also not symbolicated. However from the second content thread's data it definitely looks like that thread is spending half its time painting (during which the compositor is compositing fine) and then it seems to spend the other half doing nothing. During that "nothing" time, the compositor is also not compositing, so it seems to me like it's spending all of that time in pushing the transaction over to the parent process. That would explain the behaviour you're seeing, because the compositor would be stuck during that time just dealing with all the texture uploads and whatnot.

Just to be clear - when you load this page, you see a navbar on the top which remains fixed, a navbar on the left, and 6 graphs as the main page content? I'm just wondering if you see something different while logged in, because I'm not able to reproduce this problem at all, and the page also doesn't scroll very far. Also, can you paste the graphics section of your about:support page? Thanks!
Yes, I see a fixed navbar on the left, and 6 graphs as the main page content.
I am not being logged, so presumably we are looking at the same page.

The APZ scrolling isn't obviously janky in first glance (at least for me), but if you start a performance recording while scrolling (with APZ) or try to auto scroll the page with middle mouse button (not APZ scrolling), you will clearly see it janks.


Here is the graphics section of the about:support page, hope it helps :)

Graphics
Adapter Description	NVIDIA GeForce GTX 660 Ti
Adapter Drivers	nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Adapter RAM	2048
Asynchronous Pan/Zoom	wheel input enabled; touch input enabled
Device ID	0x1183
Direct2D Enabled	true
DirectWrite Enabled	true (6.3.9600.18123)
Driver Date	1-22-2016
Driver Version	10.18.13.6175
GPU #2 Active	false
GPU Accelerated Windows	1/1 Direct3D 11 (OMTC)
Subsys ID	35561458
Supports Hardware H264 Decoding	Yes
Vendor ID	0x10de
WebGL Renderer	Google Inc. -- ANGLE (NVIDIA GeForce GTX 660 Ti Direct3D11 vs_5_0 ps_5_0)
windowLayerManagerRemote	true
AzureCanvasBackend	direct2d 1.1
AzureContentBackend	direct2d 1.1
AzureFallbackCanvasBackend	cairo
AzureSkiaAccelerated	0
Thanks. I have two more things I'd like to check:
1) If you set layers.acceleration.draw-fps to true (no restart required), and scroll madly up and down, do you see the number in the top-left of the window hit 60?
2) Does this bug happen for you in a clean profile?

My best guess is that this is caused by a large number of small layers (we have other similar bugs on file, being worked on) but if that were the case I should be able to reproduce it as well, which is why I'm suprised that I can't. If it happens for you in a clean profile and the fps counter is staying at < 60 then it might be something else.
Component: General → Graphics
Depends on: 1231396
Product: Firefox → Core
My answers:
1) I've set layers.acceleration.draw-fps to true - scrolling (with APZ, where scrolling isn't obviously janky), seems to show somewhere around: "60 22 100".
On the other hand, auto scrolling (where the scrolling clearly janks) I can see worse numbers which seems not to hit 60fps, somewhere around: "020 023 100".

I hope my scrolling was fast enough for these numbers to be meaningful.

2) Yes, the jank can be seen also on a new profile (same results as the answer above).
Ok, so it seems like auto scrolling is always janky for you, but APZ scrolling is only janky if you are doing a performance recording (per comment 4). So in that case it would be a repainting issue, not really APZ.
Blocks: paint-fast
Component: Graphics → Layout
No longer depends on: 1231396
Summary: A lot of Recalculate Style events probably causing APZ scrolling not hitting 60 FPS → A lot of Recalculate Style events causing jank with non-APZ scrolling on specific page
Severity: normal → S3

Reporter, can you still reproduce this bug?

Flags: needinfo?(nissan4321)

(In reply to Gregory Pappas [:gregp] from comment #8)

Reporter, can you still reproduce this bug?

Unfortunately I am not able to access the mentioned site to reproduce it.

Flags: needinfo?(nissan4321)
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: