From 1b6eb0053b038a3123477cac121de7a696caecbb Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 21 Jul 2026 08:37:44 -0400 Subject: [PATCH] =?UTF-8?q?m4:=20perf=20pass=20=E2=80=94=20lazy-load=20not?= =?UTF-8?q?e=20images?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Light, audit-first perf pass (task 1870): - lazy-load + async-decode the card thumbnail and editor attachment images so an image-heavy board / large note doesn't eagerly fetch and decode every off-screen image up front Audit found the rest already in good shape and left as-is: all routes are code-split via dynamic import(); the titles index (palette, [[-autocomplete, wiki-link resolution) is cached in its store and only fetched once; board refetches are scoped to real view/label changes with no double-load on mount. (Server-side thumbnail generation — cards load full-res uploads — is a larger, separate feature, noted for later, out of scope for a light pass.) Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01FRgehjoz7Yv8LkUfADxACm --- frontend/src/components/NoteCard.vue | 2 ++ frontend/src/components/NoteEditor.vue | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/NoteCard.vue b/frontend/src/components/NoteCard.vue index 45ffd1d..5329339 100644 --- a/frontend/src/components/NoteCard.vue +++ b/frontend/src/components/NoteCard.vue @@ -142,6 +142,8 @@ onBeforeUnmount(() => document.removeEventListener("mousedown", onDocMousedown)) v-if="note.attachments.length" :src="note.attachments[0].url" alt="" + loading="lazy" + decoding="async" class="mb-2 max-h-48 w-full cursor-pointer rounded-lg object-cover" @click="emit('open', note)" /> diff --git a/frontend/src/components/NoteEditor.vue b/frontend/src/components/NoteEditor.vue index e8427a4..7457a16 100644 --- a/frontend/src/components/NoteEditor.vue +++ b/frontend/src/components/NoteEditor.vue @@ -264,7 +264,7 @@ async function act(fn: () => Promise) {
- +