Coalesce the transcript cache write instead of re-serializing it per event

Writing the whole transcript to sessionStorage on every event made ingesting a session quadratic: 1440 records cost 2880 writes and 4.5 GB of string traffic, and the view took 21.7s to fill. A write now waits for the stream to pause (or CACHE_MAX_WAIT_MS, whichever comes first) and for the page going away, and the cursor is written by that same flush, after the records it covers, so a reload can never resume from a cursor the cached records do not hold. 1440 records: 21.7s -> 4.0s, 2880 writes -> 2. 4800 records: 120.3s -> 34.3s, 50 GB -> 21 MB.

4cf69877 parent 076f0454 +151 −11
browse files