Documentweergave parseert de hele bron opnieuw bij elke rebuild #2711
Labels
No labels
accepted
bug
declined
docs
duplicate
enhancement
good first issue
in-progress
needs-info
privacy
release-blocker
security
triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
LibreKAT/Ocideck#2711
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Probleem
DocumentMarkdownView.buildvoertdocumentFootnotes(markdown)en_parse(markdown)bij elke widget-opbouw uit. In de Bron-stand van de documenteditor herbouwt de live-weergave bij elke bron-flush én bij caret-gedreven rebuilds — elke rebuild parset het hele document opnieuw en bouwt de hele blokboom.computeDocumentStatsin de informatiestrook heeft hetzelfde patroon (~4 ms per rebuild op 54 KB).Gemeten op het FMEA-document: parse+footnotes ~2–5 ms per build; stats ~3,7 ms per build; bij doortypen tientallen rebuilds per seconde.
Oplossing
Kleine memo-cache (LRU, enkele items) op de pure parse/stats-functies, gesleuteld op de bronstring: rebuilds zonder tekstwijziging (caret, thema, instellingen) kosten dan niets.