Closed Bug 1637735 Opened 4 years ago Closed 2 years ago

[Github] Very slow page loading on reddit (around 4x slower than Chromium)

Categories

(Core :: JavaScript Engine, defect, P2)

defect

Tracking

()

RESOLVED WORKSFORME
Performance Impact high

People

(Reporter: jgong, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf:pageload)

Basic information

This bug created from an existing github issue
https://github.com/mozilla-mobile/fenix/issues/10042

Steps to Reproduce:
Navigate to https://www.reddit.com/r/btrfs/

Expected Results:
Loads in less than 8 seconds with posts (not just the page scaffolding).

Actual Results:
Loads page very slowly.

See profile: https://perfht.ml/2VIHK0U

More information

Device details:
Android device: Moto G XT1031
Fenix version: latest nightly from play store

Screenshot: (if relevant, please attach a screenshot or screencast to this bug report)

Profile URL: (follow the instructions at https://profiler.firefox.com/)

Basic systems configuration:

OS version:

GPU model:

Number of cores:

Amount of memory (RAM):

Thanks so much for your help.

Blocks: 1637751

Did you mean to file this as a security bug?

Flags: needinfo?(jgong)

Gonna go out on a limb and suggest this should probably be non-confidential, but let's move to moco-confidential first - at least then all our coworkers can see it.

Group: core-security → mozilla-employee-confidential
Group: mozilla-employee-confidential
Flags: needinfo?(jgong)

Lots of time spent in the compositor. Jeff, do you have any ideas?

Component: Performance → Graphics
Flags: needinfo?(jmuizelaar)
Whiteboard: [qf:p1:pageload]

The compositor time is all spent grabbing screenshots. Please take a profile without screenshots.

It looks like the problem is JS though. There's a number of events that take >5 seconds to handle.

Flags: needinfo?(jmuizelaar) → needinfo?(jgong)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #4)

The compositor time is all spent grabbing screenshots. Please take a profile without screenshots.

Redirecting needinfo to the original reporter.

Flags: needinfo?(jgong) → needinfo?(yoasif)

Moving to JS component, as per Jeff's findings

Severity: -- → S3
Component: Graphics → JavaScript Engine

Here is a profile without screenshots: https://share.firefox.dev/2XTxFzh

I had run into a bug with profiling on the device, which delayed my response here: https://github.com/mozilla-mobile/fenix/issues/10870

Flags: needinfo?(yoasif)

Triaging: Ted do you have time to take a look at this?

I took a good look at the profile but it doesn't show much that's useful. There's also a risk here that we're seeing not specific JS-performance slowness, but just some discrepancy in JS scheduling/compilation with respect to paints or other events that drive the main page activity forward.

Assignee: nobody → tcampbell
Priority: -- → P2

This is partially another instance of Bug 1543776. In the Comment 7 profile I
see 2+ seconds spent on main-thread parsing and an atom-zone major-GC
happening.

When I compare the ICU init time between this profile and a Pixel3 device I
see a 10x slow-down. This is more than difference of CPU speed. The profiles
on these bugs seem to have very high sampler overhead (at least 40%) and are
not very useful. This should be remeasured with a lower sample rate (eg
10ms).

Re-profiled using a 10ms sample rate: https://share.firefox.dev/3cFpA6Y

Thanks for the new profile!

Assignee: tcampbell → nobody
Performance Impact: --- → P1
Keywords: perf:pageload
Whiteboard: [qf:p1:pageload]
Flags: needinfo?(acreskey)

I tried this on the latest Firefox for Android and the performance was comparable to Chrome's and quite reasonable.

I don't see a specific problem, but if anyone can reproduce one please re-open.

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(acreskey)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.