Video streaming performance #52
Labels
dif/medium
Prior experience is likely helpful
effort/hours
Estimated to take one or several hours
good first issue
Good issue for new contributors
help wanted
Seeking public contribution on this issue
kind/enhancement
A net-new feature or improvement to an existing feature
P1
High: Likely tackled by core team if no one steps up
status/ready
Ready to be worked
Trying to load the Big Buck Bunny CID via the http gateway takes about 15 seconds to start playing for me. I've managed to get it down to 5-10 seconds with some bitswap optimisations but that's still a really long time.
What's happening is the DAG is wide so Helia gets loads of CID requests in quick succession and it takes time to resolve them. This is great for fast file transfer but terrible for video streaming where we just want the first block as fast as possible.
Setting blockReadConcurrency to
1
(e.g. read one block at a time instead of a whole DAG layer at a time) when.cat
ing the file lowers playback start time to under a second.To do this more properly we should probably sniff the content type of a file by reading the first block, then set the block read concurrency accordingly (high if it's a file, low if it's a video or image (for progressive rendering?)).
This will be easier with #42 in.
The text was updated successfully, but these errors were encountered: