News for hackers. Stuff that matters.
Re:When to use web workers by msoad on Saturday June 15, 2019 @02:02PM (#20191232)
As a UI developer i want to move scrolling and style updates out of main thread. Every WebWorker tutorial is taking about how a “computationally heavy task” can go out of main thread. But rarely anyone does computation in the client.

I would say Animation Worklets are the workers that will make an impact on delivering multithreaded UIs in web.

https://www.chromestatus.com/feature/5762982487261184

Re:When to use web workers by eddiezane on Saturday June 15, 2019 @02:42PM (#20191414)
If you haven't seen this before it might interest you. Nolan worked on offloading most of the work to threads to achieve 60 fps on mobile.

http://www.pocketjavascript.com/blog/2015/11/23/introducing-...

Re:When to use web workers by chii on Sunday June 16, 2019 @01:34AM (#20194002)
That's pretty cool!
Re:When to use web workers by dassurma on Saturday June 15, 2019 @02:07PM (#20191254)
Yes, that’s exactly what AnimationWorklet is for.

That being said, I think even smaller-scale things like state management and hitting APIs should be moved to workers. It all increases resilience and buys headroom for low-end phones.

Re:When to use web workers by prasanthv on Saturday June 15, 2019 @02:53PM (#20191473)
Agreed, I’ve always wondered why this isn’t done more often, it seems like the perfect place for tasks such as those.

That being said, I’ve been a web developer for over 5 years and have never actually decided to move tasks to web workers; it’s about time I change that.

I also find it weird when devs complain about the lack of shared state and how it’s some how a limitation. Messaging passing architectures haven proven key for modelling concurrency in many powerful languages and frameworks like Erlang/Elixir and Go channels to name a few.

Anyways thanks for writing this up. Proper breakdown and grouping will have unseen benefits for sure, and in this case, very seen :)