mirror of https://github.com/ekimekim/wubloader
generate media playlist: Yield in chunks for performance
Flask sends a chunked response with one chunk per item yielded. This adds a lot of overhead per yielded item. We avoid this by collecting the lines of the media playlist into larger chunks and only flushing once every 1000 segments. For small playlists this means they'll be emitted as one chunk, but for large playlists we still get the streaming behaviour.pull/389/head
parent
1857a998c9
commit
0895ce44ff
Loading…
Reference in New Issue