caching initial noteset to improve search times

This commit is contained in:
zadam
2021-10-06 19:59:29 +02:00
parent 17fe9a6a1b
commit df8706026e
6 changed files with 40 additions and 12 deletions

View File

@@ -95,7 +95,7 @@ class Note extends AbstractEntity {
/** @param {Attribute[]} */
this.targetRelations = [];
this.becca.notes[this.noteId] = this;
this.becca.addNote(this.noteId, this);
/** @param {Note[]|null} */
this.ancestorCache = null;
@@ -1087,7 +1087,7 @@ class Note extends AbstractEntity {
beforeSaving() {
super.beforeSaving();
this.becca.notes[this.noteId] = this;
this.becca.addNote(this.noteId, this);
this.dateModified = dateUtils.localNowDateTime();
this.utcDateModified = dateUtils.utcNowDateTime();