perf(runtime): reduce cron persistence and logger overhead

This commit is contained in:
Peter Steinberger
2026-03-02 19:33:38 +00:00
parent fcec2e364d
commit 1616113170
3 changed files with 42 additions and 15 deletions

View File

@@ -187,6 +187,7 @@ export class QmdMemoryManager implements MemorySearchManager {
private readonly xdgCacheHome: string;
private readonly indexPath: string;
private readonly env: NodeJS.ProcessEnv;
private readonly managedCollectionNames: string[];
private readonly collectionRoots = new Map<string, CollectionRoot>();
private readonly sources = new Set<MemorySource>();
private readonly docPathCache = new Map<
@@ -261,6 +262,7 @@ export class QmdMemoryManager implements MemorySearchManager {
},
];
}
this.managedCollectionNames = this.computeManagedCollectionNames();
}
private async initialize(mode: QmdManagerMode): Promise<void> {
@@ -1913,6 +1915,10 @@ export class QmdMemoryManager implements MemorySearchManager {
}
private listManagedCollectionNames(): string[] {
return this.managedCollectionNames;
}
private computeManagedCollectionNames(): string[] {
const seen = new Set<string>();
const names: string[] = [];
for (const collection of this.qmd.collections) {