mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-24 07:01:49 +00:00
perf(runtime): reduce cron persistence and logger overhead
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user