Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
perf(import): skip per-note creation log during bulk operations
Elian Doran91722aad8309
diff --git a/packages/trilium-core/src/services/notes.ts b/packages/trilium-core/src/services/notes.tsindex 0cf8f13251..4915bea589 100644--- a/packages/trilium-core/src/services/notes.ts+++ b/packages/trilium-core/src/services/notes.ts@@ -317,7 +317,11 @@ function createNewNote(params: NoteParams): {eventService.emit(eventService.ENTITY_CHANGED, { entityName: "branches", entity: branch });eventService.emit(eventService.CHILD_NOTE_CREATED, { childNote: note, parentNote });- getLog().info(`Created new note '${note.noteId}', branch '${branch.branchId}' of type '${note.type}', mime '${note.mime}'`);+ if (!isEntityEventsDisabled) {+ // Skip per-note logging during bulk operations (e.g. import), where it would otherwise+ // emit one line per created note and flood the log on large imports.+ getLog().info(`Created new note '${note.noteId}', branch '${branch.branchId}' of type '${note.type}', mime '${note.mime}'`);+ }return {note,