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:
Tim van der Meij 2026-05-10 18:13:12 +02:00 committed by GitHub
commit 3b58a339c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}