fix(core): reduce indexer performance impact (#7803)

This commit is contained in:
EYHN
2024-08-09 11:57:06 +08:00
committed by GitHub
parent 7efc87b6d3
commit c006f3f0af

View File

@@ -32,8 +32,15 @@ export class DocsIndexer extends Entity {
'jq:' + this.workspaceService.workspace.id
);
private readonly runner = new JobRunner(this.jobQueue, (jobs, signal) =>
this.execJob(jobs, signal)
private readonly runner = new JobRunner(
this.jobQueue,
(jobs, signal) => this.execJob(jobs, signal),
() =>
new Promise<void>(resolve =>
requestIdleCallback(() => resolve(), {
timeout: 200,
})
)
);
private readonly indexStorage = new IndexedDBIndexStorage(