performance optimizing

This commit is contained in:
Niels Lyngsø
2023-03-27 10:32:41 +02:00
parent 1ac8a5e1e5
commit 07a1a6cc78

View File

@@ -125,7 +125,10 @@ export class UmbExtensionRegistry {
T extends ManifestBase = SpecificManifestTypeOrManifestBase<Key>
>(type: Key, alias: string) {
return combineLatest([
this.extensions.pipe(map((exts) => exts.find((ext) => ext.type === type && ext.alias === alias))),
this.extensions.pipe(
map((exts) => exts.find((ext) => ext.type === type && ext.alias === alias)),
distinctUntilChanged(extensionSingleMemoization)
),
this._kindsOfType(type),
]).pipe(
map(([ext, kinds]) => {