app: read the history a page at a time and open clips on demand

Every launch parsed all 313 timelines, raw responses and all, which put
2.1 GB of JSON on the heap at startup.

The list now holds `Summary` rows: `history::summaries` parses a file,
keeps the champion, queue, scoreline, LP change and event count, then
drops the timeline. Files are listed by write time, and `poll` reads the
next 20 when the list is scrolled near its end or when the filtered rows
do not fill the screen. Selecting a row hands its id to the review
screen, which reads that one timeline on a thread.

Peak memory over 313 recordings: 165 MB.
This commit is contained in:
vhaudiquet committed 2026-11-16 23:48:58 +01:00
1 parent 4efc2f3968
commit 6584b2f92f
7 files changed
+318 -86

No files matched your search

+4
View File
@@ -78,6 +78,10 @@ reading (`history::tests`), highlight clipping (`highlight::tests`) and formatti
4. Match history: done. Cards read `GameHistory.vue`'s fields (result, champion portrait,
queue, KDA, CS/m, gold/m, LP change) from the raw API responses in each timeline, with the
queue filters. Portraits come from Data Dragon and are cached on disk (`src/portraits.rs`).
The list holds rows, not timelines: `history::summaries` parses each file, keeps a
`Summary`, and drops the timeline with its events and raw responses, 20 rows at a time as
the list scrolls. Opening a row reads that one timeline again, on a thread, and the review
screen fills in when it arrives. Peak over 313 recordings: 165 MB, down from 2.1 GB.
5. Video: not libmpv. Rune ships a `Player` with a native surface and frame seeking
(`Player::file`, `seek`, `duration`), which removes the OpenGL and wgpu interop question the
TODO opened. The review screen uses it. If clip-accurate seeking turns out to be worse than