Skip to content

Proposal: bomb-workers add upper limit #106

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

camillobruni
Copy link
Contributor

Bomb-workers currently spawns 26 workers in parallel.
This is a highly unrealistic scenario, google maps for instance roughly limits itself to 4 workers (even on high end machines).

This PR proposes an upper limit on number of workers.
This way we still have some focus on Worker startup performance while not heavily over indexing on an unrealistic usecase.

Happy to hear feedback.

@camillobruni camillobruni requested a review from kmiller68 July 30, 2025 15:09
Copy link

netlify bot commented Jul 30, 2025

Deploy Preview for webkit-jetstream-preview ready!

Name Link
🔨 Latest commit 86796ea
🔍 Latest deploy log https://app.netlify.com/projects/webkit-jetstream-preview/deploys/688a359c197431000845865c
😎 Deploy Preview https://deploy-preview-106--webkit-jetstream-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@iainireland
Copy link
Contributor

I agree that well-designed sites should probably not spawn this many workers. On the other hand, I expect that real-world websites often do spawn a lot of threads. For example, Keith mentioned in Slack that Photoshop spawns 30+ workers.

The more workers we spawn, the more this benchmark is "about" the overhead of worker startup. Given that the actual work being performed in each of these threads is uninteresting, maybe that's not a bad thing.

I could go either way on this.

@camillobruni
Copy link
Contributor Author

This is the first time I hear about 30+ workers for photoshop. I know that maps heavily limited their page to max ~8 workers since it was just not efficient beyond that point.

Beyond that I don't have any data point on how many workers are realistic for a page.

@Constellation
Copy link
Member

Constellation commented Jul 31, 2025

Yeah, it seems that Photoshop is launching more than 40 workers, in both Safari and Chrome. I would like to keep this test as is since we are observing these use cases. segmentation is doing the other worker tests, so I would like to leave this test to check the performance for that kind of pattern to keep the coverage of the tests (like, more than 40 workers etc.).

@camillobruni
Copy link
Contributor Author

Analysing photoshop web, we do see 30+ workers being created. At the average rate of 8 / s, which roughly matches window.navigator.hardwareConcurrency == 8 (not sure how much this differs in other browser/machines).

Screenshot 2025-08-04 at 14 25 53

So I agree that spawning more that 8 workers is a valid use-case, but maybe not at the rate the current benchmark does.
However, we do see some code being run in parallel on and off on the 30 workers, that part does seem to be realistic.

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.

3 participants