-
-
Notifications
You must be signed in to change notification settings - Fork 982
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Before you start - checklist
- I followed instructions in documentation written for my React-PDF version
- I have checked if this bug is not already reported.
- I have checked if an issue is not listed in Known issues
- If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo
Description
Thank you for this great react-pdf work!
In the project I am working on, I have to mount/unmount pages quite often and just discovered a GPU memory leak.
When unmounting the Page component, the amount of GPU memory (Chrome Task Manager) remains at the previous level.
Steps to reproduce
Run app locally, see this repo
or
vercel build here
- Open Chrome task Manager (show
GPU Memorycolumn) GPU Memoryshould be ~ 1 MB- Press
Show pdfbutton. GPU Memory should jump to ~ 590 MB - Press
Hide pdfbutton. - Wait 5-10 sec for garbage colector
Expected behavior
GPU Memoryusage should drop back to ~ 2 MB
Actual behavior
GPU Memoryusage remain at same high level ~ 590 MB
Additional information
- React strict mode was switched off to not affect memory
- Hot reloading was switched off to not affect memory
- Newest versions of packages were used (vite, react, react-pdf)
- High Device Pixel Rate (10) was used to amplify an effect
Screenshoots
Environment
- Browser (if applicable): Chrome 141
- React-PDF version: react-pdf (10.2.0)
- React version: react (19.2.0)
- Bundler name and version (if applicable): vite (7.1.12)
alxmiron, orinnz and FathZulfaAli
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working