News for hackers. Stuff that matters.
Re:Persisting React State in LocalStorage by Drdrdrq on Friday February 28, 2020 @03:46PM (#22446192)
Re web workers: is anyone (apart from Google) using this in practice? I assume Photopea and similar apps could benefit from it in some specific cases, but haven't had the need for them myself. Am I missing something?
Re:Persisting React State in LocalStorage by stekern on Saturday February 29, 2020 @02:38AM (#22449487)
I've experimented with using it together with TensorFlow.js to avoid blocking the UI thread while performing computationally expensive operations. Operations do take a bit longer to complete in a web worker compared to the main thread, but in return you get a smooth UI and a better user experience
Re:Persisting React State in LocalStorage by ficklepickle on Saturday February 29, 2020 @02:55AM (#22449535)
Last I checked, they can only pass messages to the main thread as strings. All that (de)serialization can easily become a bottleneck, depending on the workload.
Re:Persisting React State in LocalStorage by crubier on Friday February 28, 2020 @03:52PM (#22446256)
Yes we use it for relatively heavy processing in our web app. To not block the UI and allow offline use