You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
web app: Backlinks, Outgoing links and the backlink count refetch on every save #212
BacklinksContainer (app/src/app/panes/links.tsx:85-106): note.backlinks, then unlinkedGroups (links.tsx:47-70), which is note.read plus 1 note.search for the title and for each alias
Each has files (useFiles((s) => s.files)) in its effect's dependencies, as the trigger. applyFileEvent (app/src/data/files.ts:83-92) makes a new files map for each note.changed whose hash differs, and each save emits one. So while a person types, each autosave costs 2 note.backlinks, 1 note.read, 1 or more note.search and 1 note.links round trips through lodge, even when no link changed. useNoteCounts and the aliases sync already wait for the changes to stop (COUNT_DELAY, status.ts:66-67); these 3 do not.
What's wanted: let these hooks wait until the changes stop (as COUNT_DELAY does) or trigger on pathsVersion plus a debounced content change, so a burst of saves costs 1 refresh. The panes then catch up a short time after typing stops; that is a change in behavior, so it is not done in a grooming pass.
Activity