Skip to content

Performance difference between spawn/spawn_blocking on web target. #334

Closed Answered by control9
control9 asked this question in Q&A
Discussion options

You must be logged in to vote

To answer my own question (and, hopefully, save someone from spending couple of evenings debugging the issue), there were two separate reasons for slowdown, which I was triggering occasionally, and, ironically, my attempts to add more logging or do profiling made situation worse.
Reason 1: Opening dev tools. Expected behaviour, however, as per V8 docs. Googling for "Chrome wasm JIT" was not very efficient, so it took me some time to catch this one, and "profiling" section is what made it even more fun, as during profiling all code suddenly got tiered up, eliminating the issue.
Reason 2: While trying to fix the issue, I switched to having single worker in a loop waiting for message in chan…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by temeddix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant