Following a long transcript reconverts the whole file each change #80
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?
From: #72 (M33).
An opened (not continued) conversation's block checks its transcript every second and, when it changed, converts the whole file again (
refresh_import→conversations::convert::entries). geek's transcripts go up to 31 MiB (S20), and a live session changes many times a minute, so following a long session reparses tens of MiB per change. Not measured yet.Done in main (
69d4fb4, from6ba0a1b; numbers in PLAN.md under "#77 and #80: as built").convert::Followkeeps the converter's state and the offset of the last whole line, and converts only what was appended. It converts again from the start when the file shrinks, is replaced, or its last 4 KiB before the offset differ. Tests check that following gives exactly what a whole conversion gives.Measured on geek (release build), 30.6 MiB transcript: 31–47 ms and 31 MiB peak to convert the whole file on each change before. After, an appended line costs 0.21 ms median on its own, or 1.3 ms median (2.1 ms max) with #79's branch marking, which walks the chain on each read. No measurable memory either way.