mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-26 22:11:03 +02:00
0d39002af0
The 1s snapshot poll re-read and re-parsed the whole worker state file — which retains every completed item's result (history row, possibly full synced lyrics; 1.5-5 KB each) for the entire run — then re-serialized it across the channel and re-iterated it on the Dart UI isolate. Late in a 1000-track batch that is megabytes parsed several times per second, on the Android main thread. Pollers now echo back the state_serial of the last snapshot they fully processed; when the state has not advanced, the native side serves a cached compact header (no items, no results, no settings) merged with the small progress delta — steady-state polls are O(1) regardless of batch size, and the full payload is delivered exactly once per state transition. The channel handler also reads and parses off the main thread now, matching its neighbours.