Merge pull request #14347 from Snuffleupagus/improve-pageKidsCountCache
Improve caching in `Catalog.getPageDict` (PR 8207 follow-up)
This commit is contained in:
commit
b178985615
@ -1102,7 +1102,7 @@ class Catalog {
|
|||||||
if (isRef(currentNode)) {
|
if (isRef(currentNode)) {
|
||||||
const count = pageKidsCountCache.get(currentNode);
|
const count = pageKidsCountCache.get(currentNode);
|
||||||
// Skip nodes where the page can't be.
|
// Skip nodes where the page can't be.
|
||||||
if (count > 0 && currentPageIndex + count < pageIndex) {
|
if (count >= 0 && currentPageIndex + count <= pageIndex) {
|
||||||
currentPageIndex += count;
|
currentPageIndex += count;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user