Closed Bug 1874013 Opened 1 year ago Closed 9 months ago

Slow rendering of PDF files with smask

Categories

(Firefox :: PDF Viewer, defect, P3)

Firefox 115
defect

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox121 --- wontfix
firefox122 --- wontfix
firefox123 --- wontfix
firefox124 --- wontfix
firefox125 --- wontfix
firefox126 --- wontfix
firefox127 --- fixed

People

(Reporter: kurt, Assigned: calixte)

References

(Regression)

Details

(Keywords: nightly-community, regression, Whiteboard: [pdfjs-performance])

Attachments

(2 files)

Attached file go_res_el_nl_9.pdf

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0

Steps to reproduce:

The attached pdf renders incorrectly in firefox. It renders correctly in most other viewers including acrobat reader, gimp, evince, chromium. Some of the text is rendered 180 degrees wrong and is placed at the wrong location.

It's also taking about 10 seconds to render it, instead of something less than 1 second for all others viewers.

The Bugbug bot thinks this bug should belong to the 'Firefox::PDF Viewer' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → PDF Viewer

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=a5d4d5683825a62dc0bec7751dec7b35cd82741f&tochange=1f1f1546a0b1c842df25284b8d2d7785924122ba

Suspect:
105fdd8ffc62918942a9d4d2e3a8af50a469b40b Brendan Dahl — Bug 1756928 - Update pdf.js to version 2.13.189 r=pdfjs-reviewers,calixte

Status: UNCONFIRMED → NEW
Ever confirmed: true
Regressed by: 1756928

I was able to reproduce this issue on MacOS 13.2.1 using Fx 121.0.1, Fx 122.0b9 and Nightly 123.0a1(2024-01-14).

About the rendering speed regression, See Bug 1874083 .

See Also: → 1874083

Set release status flags based on info from the regressing bug 1756928

The severity field is not set for this bug.
:calixte, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(cdenizet)

We definitely must avoid to get image data when doing the smask stuff.

Severity: -- → S3
Flags: needinfo?(cdenizet)
Priority: -- → P3
Duplicate of this bug: 1874514
Duplicate of this bug: 1874083
Duplicate of this bug: 1885870
Performance Impact: --- → ?
Summary: incorrect rendering of pdf file → Incorrect and slow rendering of some PDF files
Whiteboard: [pdfjs-performance]
Severity: S3 → S2

I can still reproduce the slowness after the fix from bug 1894705, while Calixte can't.

Alice, Raluca, Kurt, can you still reproduce the slowness?

Flags: needinfo?(rpopovici)
Flags: needinfo?(kurt)
Flags: needinfo?(alice0775)

The slowdown is still present on Nightly127.0a1 ubuntu22.04.

Flags: needinfo?(alice0775)

So I can't reproduce the slowness on Windows 11 where it's a way better but it's awfully slow on Mac OS 14.4.1.
Here's a profile:
https://share.firefox.dev/44yu4sr

For the context, we merged a patch few days ago in order to remove the use of (put/get)ImageData and replace them in using filters and composition (see https://github.com/mozilla/pdf.js/pull/18029).
:jrmuizel, could you have a look please ?

Flags: needinfo?(jmuizelaar)

Thanks. The slowness in my case is due to bug 1894906.

See Also: → 1894906

This is spending a bunch of time doing canvas filters in software which is how we do them on macOS.

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

Reducing to S3 because the patch helped a lot, and the problem now is only reproducible on Mac and some Windows machines (bug 1894906).

Severity: S2 → S3

Actually, I'll mark this as fixed and open a new bug about the incorrect rendering and a new bug about the Mac-specific slowness.

Assignee: nobody → cdenizet
Status: NEW → RESOLVED
Closed: 9 months ago
Performance Impact: ? → ---
Flags: needinfo?(rpopovici)
Flags: needinfo?(lsalzman)
Flags: needinfo?(kurt)
Resolution: --- → FIXED
Summary: Incorrect and slow rendering of some PDF files → Slow rendering of PDF files with smask
Target Milestone: --- → 127 Branch
See Also: → 1895496
See Also: → 1895499

Removing the "qe-verify+" flag as bugs 1895496, 1894906 were filed for the described behavior in Comment 0 and are still open.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: