mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
To prevent search lag when there are a large number of notes
This commit is contained in:
@@ -11,7 +11,8 @@ const SELECTED_NOTE_PATH_KEY = "data-note-path";
|
||||
const SELECTED_EXTERNAL_LINK_KEY = "data-external-link";
|
||||
|
||||
// To prevent search lag when there are a large number of notes, set a delay based on the number of notes to avoid jitter.
|
||||
const notesCount = await server.get<number>(`stats/notesCount`);
|
||||
const notesCount = await server.get<number>(`autocomplete/notesCount`);
|
||||
console.log(notesCount);
|
||||
let debounceTimeoutId: ReturnType<typeof setTimeout>;
|
||||
|
||||
function getSearchDelay(notesCount: number): number {
|
||||
|
||||
Reference in New Issue
Block a user