Open Bug 1493218 Opened 7 years ago Updated 3 years ago

GitHub PDF render is about 6x slower in Firefox compared to Chrome or Edge

Categories

(Core :: Graphics, defect, P3)

Unspecified
Windows 10
defect

Tracking

()

Performance Impact low
Tracking Status
firefox-esr60 --- wontfix
firefox62 --- wontfix
firefox63 --- affected
firefox64 --- affected

People

(Reporter: cpeterson, Unassigned)

References

()

Details

(Keywords: perf, Whiteboard: [gfx-noted])

GitHub uses PDF.js to render PDF files, but it is much slower in Firefox than Chrome and Edge. STR: 1. Load https://github.com/isocpp/CppCoreGuidelines/blob/master/docs/Lifetime.pdf EXPECTED RESULT: On my Windows 10 laptop, Chrome renders the PDF in about 4 seconds. Edge renders it in about 6 seconds. ACTUAL RESULT: Firefox 62 and 64 Nightly render it in about 27 seconds. Here is a Gecko profile of 64 Nightly. It looks like most of the time is spent in D2D. https://perfht.ml/2QQaim7
Bas, looking at the profile, it seems we're spending lots of time inside DrawTargetD2D, mostly in D2D both from flushing inside FillGlyphs, and because it's seemingly creating a lot of expensive layers too inside PushClip (which is getting called from the JS). Ideas?
Flags: needinfo?(bas)
Keywords: perf
OS: Unspecified → Windows 10
Priority: -- → P3
Whiteboard: [qf] → [qf] [gfx-noted]
FWIW: on Linux Nightly, it renders in about 3 seconds.
Whiteboard: [qf] [gfx-noted] → [qf:p3:f67][gfx-noted]
This does seem to be a Windows-specific problem. On my Mac, the PDF renders in less than two seconds. I forgot to mention in the STR: 2. Scroll to the bottom of the PDF and wait for the last page (45) to finish rendering.
Whiteboard: [qf:p3:f67][gfx-noted] → [qf:p3][gfx-noted]

This seems to still render much more slowly to me on Firefox vs Chrome with WebRender.

Flags: needinfo?(bas)
Performance Impact: --- → P3
Whiteboard: [qf:p3][gfx-noted] → [gfx-noted]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.