3 ms·
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
by msoad 7y ago
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 https://www.chromestatus.com/feature/5762982487261184
- dassurma 7y agoYes, 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.
- prasanthv 7y agoAgreed, 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 :)
- eddiezane 7y agoIf 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-pokedex-org http://www.pocketjavascript.com/blog/2015/11/23/introducing-...
- chii 7y agoThat's pretty cool!