Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video streaming performance #52

Open
achingbrain opened this issue Apr 12, 2024 · 1 comment
Open

Video streaming performance #52

achingbrain opened this issue Apr 12, 2024 · 1 comment

Comments

@achingbrain
Copy link
Member

achingbrain commented Apr 12, 2024

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 .cating 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.

@SgtPooki
Copy link
Member

I love the idea of progressive enhancement for how we do dag traversal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants