Skip to content

Commit 8922113

Browse files
perf: Fetch registry files in parallel (#3416)
Minor performance improvements to registry updating logic, for some reason we were not fetching the files in parallel.
1 parent 852f7e0 commit 8922113

File tree

1 file changed

+4
-2
lines changed
  • packages/snaps-controllers/src/snaps/registry

1 file changed

+4
-2
lines changed

packages/snaps-controllers/src/snaps/registry/json.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,11 @@ export class JsonSnapsRegistry extends BaseController<
218218
}
219219

220220
try {
221-
const database = await this.#safeFetch(this.#url.registry);
221+
const [database, signature] = await Promise.all([
222+
this.#safeFetch(this.#url.registry),
223+
this.#safeFetch(this.#url.signature),
224+
]);
222225

223-
const signature = await this.#safeFetch(this.#url.signature);
224226
this.#verifySignature(database, signature);
225227

226228
this.update((state) => {

0 commit comments

Comments
 (0)