Feature Request: Configurable Preloaded Pages in PDF.js
The internal PDF viewer based on PDF.js is quite efficient for reading both short papers and heavy books with hundreds of pages. However, fast scrolling across multiple pages is currently limited by the number of preloaded pages.
This limit is controlled by the parameter DEFAULT_CACHE_SIZE, which is currently hardcoded to 10 in pdf.js/web/pdf_viewer.js. Since you have already forked PDF.js for Zotero, it would be great to make this parameter configurable.
Modern computers with 64GB+ RAM and 12+ cores could comfortably preload more pages (e.g., 30 or 100). While it's true that setting this value too high may decrease performance (as discussed in this GitHub issue), that discussion took place several years ago. Computer performance has improved significantly since then, and optimizing the PDF viewer's performance remains crucial. The ability to increase scrolling performance by threefold in certain situations would be a valuable enhancement for users with powerful hardware.
This limit is controlled by the parameter DEFAULT_CACHE_SIZE, which is currently hardcoded to 10 in pdf.js/web/pdf_viewer.js. Since you have already forked PDF.js for Zotero, it would be great to make this parameter configurable.
Modern computers with 64GB+ RAM and 12+ cores could comfortably preload more pages (e.g., 30 or 100). While it's true that setting this value too high may decrease performance (as discussed in this GitHub issue), that discussion took place several years ago. Computer performance has improved significantly since then, and optimizing the PDF viewer's performance remains crucial. The ability to increase scrolling performance by threefold in certain situations would be a valuable enhancement for users with powerful hardware.
Upgrade Storage