Merge pull request #11263 from Snuffleupagus/viewer-disableAutoFetch-pagesCount
Attempt to reduce resource usage, by not eagerly fetching all pages, for long/large documents
This commit is contained in:
commit
d7f651aa98
@ -454,7 +454,10 @@ class BaseViewer {
|
|||||||
this.findController.setDocument(pdfDocument); // Enable searching.
|
this.findController.setDocument(pdfDocument); // Enable searching.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pdfDocument.loadingParams['disableAutoFetch']) {
|
// In addition to 'disableAutoFetch' being set, also attempt to reduce
|
||||||
|
// resource usage when loading *very* long/large documents.
|
||||||
|
if (pdfDocument.loadingParams['disableAutoFetch'] ||
|
||||||
|
pagesCount > 7500) {
|
||||||
// XXX: Printing is semi-broken with auto fetch disabled.
|
// XXX: Printing is semi-broken with auto fetch disabled.
|
||||||
pagesCapability.resolve();
|
pagesCapability.resolve();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user