mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-05-31 15:21:00 +02:00
Merge pull request #21213 from saripovdenis/perf-name-tree-getall-queue-index
perf: Avoid multi-second getDestinations stalls for PDFs with many named destinations
This commit is contained in:
commit
3b58a339c8
@ -46,8 +46,8 @@ class NameOrNumberTree {
|
||||
processed.put(this.root);
|
||||
}
|
||||
const queue = [this.root];
|
||||
while (queue.length > 0) {
|
||||
const obj = xref.fetchIfRef(queue.shift());
|
||||
for (const node of queue) {
|
||||
const obj = xref.fetchIfRef(node);
|
||||
if (!(obj instanceof Dict)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user