Skip to content

[Bug]: Extreme RAM spike for PDF flyer with several images #19968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Openstreetmapler opened this issue May 22, 2025 · 1 comment
Open

[Bug]: Extreme RAM spike for PDF flyer with several images #19968

Openstreetmapler opened this issue May 22, 2025 · 1 comment

Comments

@Openstreetmapler
Copy link

Openstreetmapler commented May 22, 2025

Attach (recommended) or Link to PDF file

Wetterpark_Flyer_240410_Faltplan_RPPortalWPOF_07jh.pdf

Web browser and its version

Firefox 128.0.3 (Apple Silicon)

Operating system and its version

macOS 12.7.5 (Monterey) on Apple M1

PDF.js version

Unknown

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

Yes

Steps to reproduce the problem

  • Open the attached PDF, scroll to page 2 and zoom in.

OR

  • Go to the demo and quickly scroll down by dragging the scroll bar with your mouse cursor.

What is the expected behavior?

Normal RAM usage – the PDF file is about 11 MB in size and RAM usage should be lower than 250 MB! Apple Preview manages to only need about 200 MB of RAM while displaying the attached file!

What went wrong?

With the attached flyer, the RAM usage suddenly increased by more than one gigabyte, also taking up swap space! This really messes with the usability of my entire computer! At this time, the yellow spike on the left of the memory pressure monitor occurred:
Image

After that, I tried the online demo and did some fast scrolling, increasing Firefox’s RAM usage to almost 3 GB!
Image

Link to a viewer

No response

Additional context

How do you know the version number of pdf.js bundled with Firefox?

@calixteman
Copy link
Contributor

calixteman commented May 22, 2025

Is the bug reproducible in Firefox nightly ?
If yes, could you get a profile from it with the Firefox profiler and attach it here ?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants