Open Bug 1045721 Opened 6 years ago Updated 2 years ago

"Using web workers" needs code improvements


(Developer Documentation :: API: Web Workers, defect)

Not set


(Not tracked)


(Reporter: Harald, Unassigned)


That convoluted unit test snippet can be simplified. Also the types are similar to JSON, why is it important to go into so much detail on the types that can be provided.

Another pain point is the various examples asyncEval, which is a bad use case for Web Workers (eval!) but which is the first extensive example. A nice example would be some expensive algorithm on a worker. Another good one is getting pixel data from canvas, transferring the typed array and doing some things with the colors.
Since this bug was filed, the article has been corrected and completed.

Harald, can you review:

and see if it is better now?
Flags: needinfo?(hkirschner)
Example #1 might need a line of why and where this would be useful.

Example #2 is still very complex and I am not sure how far it illustrates data passing vs whatever else it does.

Other ideas for examples: Physics simulation, decompression (, crypto
Flags: needinfo?(hkirschner)
ni/ myself to be sure this stays on my radar
Flags: needinfo?(jypenator)
Flags: needinfo?(jypenator)
Assignee: jypenator → nobody
You need to log in before you can comment on or make changes to this bug.