Opening a PDF file results in a significant increase in RAM usage, exceeding 2 GB.
Categories
(Firefox :: PDF Viewer, defect, P3)
Tracking
()
People
(Reporter: kcchouette+mozilla, Unassigned)
Details
(Keywords: perf:resource-use)
Steps to reproduce:
- Navigate to the following URL: https://www.auchan.fr/catalogue/super/274980-AOHB12tZ?page=1&version=V2
- Click on the "Télécharger" button to download the PDF file.
- Monitor the RAM usage during the opening process.
- The PDF should open by itself using the PDF.js lib
Actual results:
The RAM usage spikes to over 2 GB
Expected results:
The RAM usage should remain within a reasonable range while opening the PDF file.
Using mozregression, here that I found:
DEBUG : Found commit message:
Bug 1934672 - Update PDF.js to new version f8d11a3a3af7c81df4ac175a2030d3bf4edff5c5 r=pdfjs-reviewers,marcoDifferential Revision: https://phabricator.services.mozilla.com/D230815
DEBUG : Did not find a branch, checking all integration branches
INFO : The bisection is done.
INFO : Stopped
app_name: firefox
build_date: 2025-01-15
build_file: /home/user/.mozilla/mozregression/persist/2025-01-15--mozilla-central--firefox-136.0a1.en-US.linux-x86_64.tar.xz
build_type: nightly
build_url: https://archive.mozilla.org/pub/firefox/nightly/2025/01/2025-01-15-21-57-20-mozilla-central/firefox-136.0a1.en-US.linux-x86_64.tar.xz
changeset: f7524feb52aa820a5e877b14b4a0a02815cf3ae8
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=462f654f2467c66d27121759aea4cf0675920a4c&tochange=f7524feb52aa820a5e877b14b4a0a02815cf3ae8
repo_name: mozilla-central
repo_url: https://hg.mozilla.org/mozilla-central
Comment 2•1 month ago
|
||
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.
![]() |
||
Updated•1 month ago
|
Comment 3•1 month ago
|
||
The regressor is very likely:
https://github.com/mozilla/pdf.js/pull/19023
Most of the memory is used to create the patterns used to draw the gradient.
We should really avoid to use a pattern when when we're filling or stroking with a gradient.
Comment 4•8 days ago
|
||
I've observed a noticeable increase in memory usage while the catalogue PDF was being opened in a new tab when using Firefox 138.0.1 on Windows10 and macOS15. Based on this behavior, I'm updating the status to New.
Description
•