Rebuild a login's channel view in slices after a merge #50
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/view-rebuild-stall"
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?
With GC out of the way (#49), the one stall left in a profile of the live pool was a login's channel view rebuilding after a merge: 1.4 s, split between
assignStreams(48%), sync gzip (21%) and the view loop. It runs whenever a TV asks for the list after a merge.buildView's work is a generator.buildViewruns it in one go as before;buildViewSlicedruns it in slices of about 25 ms and gzips on zlib's threads.assignStreamsskips the member pass for channel objects the merge reused with the same id: the pool only reuses a channel when its streams are unchanged, so their ids are already recorded. Stream ids are still assigned before the first pause, so two builds never interleave changes to them.On the real pool (login countries UK,US, 28,720 channels), deployed vs this branch, same view and same id state in every round:
What's left in the longest block is
assignStreamsitself, after a big provider refresh.Tests: 146/146 pass.