Worker threads actually share memory in Node.js so there's no copy getting the CAR bytes into the worker. This allows WASM piece hashing in a worker that doesn't stall the main thread.
Before
Notice how the spinner is stalled for multiple seconds as piece hashing is done:
Worker threads actually share memory in Node.js so there's no copy getting the CAR bytes into the worker. This allows WASM piece hashing in a worker that doesn't stall the main thread.
Before
Notice how the spinner is stalled for multiple seconds as piece hashing is done:
https://github.com/storacha-network/w3cli/assets/152863/5d88f8c5-e7ae-4da3-96ce-a686fb3f2258
After
No stall!
https://github.com/storacha-network/w3cli/assets/152863/747a412e-1c27-456b-913f-a4ec6e29498a