#437 Chart series on indexed timelines: keep their filtered views up to date instead of rebuilding them
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#437
- issue
- state:closed
Follow-up to #434. A background chart's series on a server or desktop timeline read the filtered views a separation by tags reads (`oc_views` on the server, `Workspace::view` on the desktop). Each view is built from the whole saved document, once per saved revision. That suits separations, which people open now and then. A chart series is asked for whenever a chart is shown, and a timeline taking in logs gets a new revision every few seconds, so each series' view would be rebuilt from the whole timeline that often. #434 bounds this on the page: a series is asked for again at most every 30 seconds while the timeline keeps changing, and meanwhile shows a slightly earlier revision than the total. The cost per rebuild still grows with the timeline: three full reads and index writes for Log severity chart on a million-entry log. Options: - Carry a filtered view forward from one revision to the next with the patch's changed moments (as `server/incremental.mjs` does for the timeline's own index), rather than rebuilding it. - Keep per-tag counts in the summary tree's nodes for a bounded set of tags a timeline declares (the issue's original idea), so a series reads the timeline's own index. - Rebuild on a schedule in the background, so no request waits on a build. The browser's in-memory index already updates its series counts incrementally (`TimelineIndex.taggedGroups`). https://github.com/openchronology/timeline-app/issues/437