News for hackers. Stuff that matters.
Re:The State of JavaScript – Survey results by sotojuan on Monday October 03, 2016 @02:00PM (#12629753)
The problem with frontend is that making code synchronous blocks the client—even if it's something that "should be" synchronous. If it's anything more complex than a loop or a map through an array, it's recommended you make it async.
Re:The State of JavaScript – Survey results by BinaryIdiot on Monday October 03, 2016 @02:18PM (#12629925)
Making something asynchronous doesn't do anything magical to unblock the client; a long running asynchronous call that's not accessing an external resource will block the client just as much with the only differencing being the scheduler gets freed up just before running the asynchronous code. If you have something long running you need to use a generator yield pattern (process in pieces with ES5). I addressed this in my initial comment.