Skip to content

Commit

Permalink
fix(core): reduce indexer performance impact (#7803)
Browse files Browse the repository at this point in the history
  • Loading branch information
EYHN authored Aug 9, 2024
1 parent 7efc87b commit c006f3f
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c006f3f

Please sign in to comment.