Skip to content

Speedup fetch step by limiting concurrency on network requests only#1182

Merged
arcanis merged 2 commits into
masterfrom
fetch-speedup
Apr 10, 2020
Merged

Speedup fetch step by limiting concurrency on network requests only#1182
arcanis merged 2 commits into
masterfrom
fetch-speedup

Conversation

@larixer
Copy link
Copy Markdown
Member

@larixer larixer commented Apr 10, 2020

What's the problem this PR addresses?

The fetch step can be speedup. Currently we are capping number of concurrently running fetchers. The problem with this approach is that we really want to cap network requests, but fetchers do more than that and directly capping fetchers suboptimal and produces download stalls.

How did you fix it?

I am not capping fetchers, but instead cap the network requests directly, this results in 15% speed increase on my laptop of the fetch step (relative to dns-cache branch which has limit of 8 concurrent fetcher instead of 5 in master now).

@larixer larixer requested a review from arcanis April 10, 2020 14:42
@arcanis arcanis merged commit aaf0e84 into master Apr 10, 2020
@arcanis arcanis deleted the fetch-speedup branch April 10, 2020 22:40
@arcanis
Copy link
Copy Markdown
Member

arcanis commented Apr 10, 2020

We still need some concurrency on fetch, cf:
https://github.com/yarnpkg/berry/runs/578077759

@larixer
Copy link
Copy Markdown
Member Author

larixer commented Apr 11, 2020

Yes...

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

Successfully merging this pull request may close these issues.

2 participants