diff --git a/src/core/catalog.js b/src/core/catalog.js index 6245bfae3..9e2d08474 100644 --- a/src/core/catalog.js +++ b/src/core/catalog.js @@ -691,6 +691,11 @@ class Catalog { } getDestination(id) { + // Avoid extra lookup/parsing when all destinations are already available. + if (this.hasOwnProperty("destinations")) { + return this.destinations[id] ?? null; + } + const rawDests = this.#readDests(); for (const obj of rawDests) { if (obj instanceof NameTree || obj instanceof Dict) {