mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-05-06 20:29:12 -05:00
caching initial noteset to improve search times
This commit is contained in:
@@ -64,17 +64,11 @@ function loadNeededInfoFromDatabase() {
|
||||
* @return {SearchResult[]}
|
||||
*/
|
||||
function findResultsWithExpression(expression, searchContext) {
|
||||
let allNotes = Object.values(becca.notes);
|
||||
|
||||
if (searchContext.dbLoadNeeded) {
|
||||
loadNeededInfoFromDatabase();
|
||||
}
|
||||
|
||||
// in the process of loading data sometimes we create "skeleton" note instances which are expected to be filled later
|
||||
// in case of inconsistent data this might not work and search will then crash on these
|
||||
allNotes = allNotes.filter(note => note.type !== undefined);
|
||||
|
||||
const allNoteSet = new NoteSet(allNotes);
|
||||
const allNoteSet = becca.getAllNoteSet();
|
||||
|
||||
const executionContext = {
|
||||
noteIdToNotePath: {}
|
||||
|
||||
Reference in New Issue
Block a user