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/375/head
parent
2541865e6c
commit
60f7922387
Loading…
Reference in New Issue