Closed Bug 1610147 Opened 6 years ago Closed 6 years ago

25ms paints on Twitter with WebRender when refreshing for latest posts

Categories

(Core :: Web Painting, defect, P3)

Unspecified
All
defect

Tracking

()

RESOLVED WORKSFORME
Performance Impact medium

People

(Reporter: yoasif, Unassigned)

Details

(Keywords: perf:responsiveness)

Noticed while refreshing latest posts on Twitter that the pull down and scroll up animation is not as smooth as on Bromite on the same device.

I am on a Pixel 2 and I enabled WebRender on GeckoView example to more closely try to match what I am seeing in Fenix.

Steps to reproduce:

  1. Login to Twitter
  2. Pull down on page 4 times

Expected to see smooth animation/scroll -- instead it looks slightly janky.

Profile here: https://perfht.ml/2NFNaH3

-> perf

Flags: needinfo?(vchin)
Priority: -- → P3
Flags: needinfo?(vchin)
Whiteboard: [qf]

The profile https://perfht.ml/2SnaBpT shows slow display list building and WebRender display list conversion. Most paints take longer than 20ms.

Component: General → Web Painting
Product: GeckoView → Core
Summary: Twitter janking when refreshing for latest posts → 25ms paints on Twitter with WebRender when refreshing for latest posts

I've extracted the accessibility problem shown in the profile into a different bug, bug 1613756.

(In reply to Asif Youssuff from comment #0)

Profile here: https://perfht.ml/2NFNaH3

Asif, this profile has a build ID of 20190714093936 (see the arrow panel from the button in the top right corner), so it's using a 6-7 month old Gecko. Can you re-test with a more modern GeckoView-example.apk?
You can get the latest one from this URL, I think: https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.v2.mozilla-central.nightly.latest.mobile.android-api-16-opt/artifacts/public/build/geckoview_example.apk (EDIT: changed the URL to include ".nightly")

Flags: needinfo?(yoasif)

Markus,

It looks a lot better with the GeckoView Example link you provided. See https://perfht.ml/2vheFjS

I have been grabbing the GV Example app from https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.nightly.latest.mobile.android-api-16-opt/artifacts/public/build/geckoview_example.apk linked from https://profiler.firefox.com/docs/#/./guide-remote-profiling -- I guess this link is wrong. Can this be updated, because I am not sure I would have opened a bug if I had been running this GV Example build.

Flags: needinfo?(yoasif)

I see. Yes, that page has to be updated. It's so out of date now. I've been meaning to update it for a long time.

(In reply to Asif Youssuff from comment #5)

It looks a lot better with the GeckoView Example link you provided. See https://perfht.ml/2vheFjS

Cool! Still no 60fps, but it's better than before.

The product::component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit auto_nag documentation.

Priority: P3 → --
Priority: -- → P3

(In reply to Markus Stange [:mstange] from comment #6)

I see. Yes, that page has to be updated. It's so out of date now. I've been meaning to update it for a long time.

It is updated now. https://profiler.firefox.com/docs/#/./guide-remote-profiling

P2 based on the 25ms, we can lower it to P3 if it's getting better.

Whiteboard: [qf] → [qf:p2:responsiveness]

Asif, this is a current Fenix build -- can you reproduce the issue there?
https://firefox-ci-tc.services.mozilla.com/tasks/index/project.mobile.fenix.v2.fennec-production.2020.02.20/latest
You can capture profiles after enabling USB debugging from Settings

Flags: needinfo?(yoasif)

Andrew, I'm not sure what is up with the build you linked me to, but it basically locks up as soon as I try to enter credentials into Twitter (I am not logged in on this version of Firefox Preview).

I'm guessing the issue is Fenix specific, and I would have created a new bug on GitHub, but since you asked me to run this build, I figured I would share the profile I captured here: https://perfht.ml/2ulz3jw

I opened the new Fenix, went to the Twitter login page, tapped the username box... and Fenix stopped responding. Android asked me if I wanted to close the app or wait. I waited and captured the profile above.

Not sure how to continue, but I think this new issue is also worth investigating.

Another profile after a few minutes of waiting for Fenix to work again - it never started working again, but here's the profile: https://perfht.ml/37ToPEK

Flags: needinfo?(yoasif)

Asif, I can't reproduce that issue when using the linked binary from Comment 11.

But it looks to me like a serious problem (not related to WebRender)
I think the parent process main java thread is locked up in this function:
mozilla.components.browser.engine.gecko.autofill.GeckoLoginDelegateWrapper.onLoginFetch

https://perfht.ml/2PlLBil

Implemented in Android Components here

Can I ask you to log this against Fenix?

Flags: needinfo?(yoasif)
Flags: needinfo?(yoasif)

Asif, has this improved?

Flags: needinfo?(yoasif)

It seems pretty good now - new profile: https://share.firefox.dev/31s7Itu

Flags: needinfo?(yoasif)

Great! I agree, some room for improvement, but it seems acceptable.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Performance Impact: --- → P2
Whiteboard: [qf:p2:responsiveness]
You need to log in before you can comment on or make changes to this bug.