DocHub-ULB / DocHub

A student platform for ULB focused on real student collaboration
https://dochub.be
GNU Affero General Public License v3.0
46 stars 14 forks source link

Urgent: fix a memory hog when rendering a big pdf #269

Closed C4ptainCrunch closed 2 years ago

C4ptainCrunch commented 2 years ago

Fix the configuration of the IntersectionObserver to detect the pages that are visible so we can avoid rendering the invisible pages in the initial rendering as well as when scrolling.

Most important change is the removal of L122. The rest is refactoring that helps debugging the issue as well a better logging to understand it better.

This bugfix is urgent as it might use many GB of RAM on some pdfs and is enough to crash Firefox for some users.