Skip the first/last visible pages pre-rendering page layouts with "holes" (PR 14131 follow-up)
This was a stupid oversight on my part, since the first/last visible pages have obviously already been rendered at the point when we're checking for any potential "holes" in the page layout. While this will obviously not have any measurable effect on performance, we should nonetheless avoid doing completely unnecessary checks here.
This commit is contained in:
parent
24b7fb20ef
commit
91692a20d1
@ -132,7 +132,7 @@ class PDFRenderingQueue {
|
||||
// All the visible views have rendered; try to handle any "holes" in the
|
||||
// page layout (can happen e.g. with spreadModes at higher zoom levels).
|
||||
if (lastId - firstId > 1) {
|
||||
for (let i = 0, ii = lastId - firstId; i <= ii; i++) {
|
||||
for (let i = 1, ii = lastId - firstId; i < ii; i++) {
|
||||
const holeId = scrolledDown ? firstId + i : lastId - i,
|
||||
holeView = views[holeId - 1];
|
||||
if (!this.isViewFinished(holeView)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user