4 ms·
I hope 2015 is the year JS devs really start pushing for real async/threaded support in the browser. I was working on the reapp HN reader app[0] for the last fe
by nwienert 12y ago
I hope 2015 is the year JS devs really start pushing for real async/threaded support in the browser. I was working on the reapp HN reader app[0] for the last few days attempting to find out why Safari would choke for up to 20 seconds on displaying ~500 DOM nodes, and this article just sparked an idea which turned out to be true: flex-box was causing it.
Switching to display: 'block' and it's under 100ms. I think now I'll look at using css-layout to just spit out absolute positions.
I also appreciate the shout out in the article to reapp. I've spend the last few days working with WebWorkers, which have some interesting potential, but without access to the UI are going to be tricky to implement. Again, the React guys have gotten something working, and we had an interesting conversation about using Flux to communicate between Workers/main thread, which I'll be exploring.
Long and short of it is this: We've gotten pretty damn close with the web these days. For anything that doesn't use exceeding long lists of media-heavy content, you can actually get 60fps with react. But you have to be careful.
I'd love to see UI workers, async DOM ops, and even Canvas support for better accessibility. Web developers should all be writing and voting up articles like this.
[0] http://hn.reapp.io http://hn.reapp.io
- taylorbuley 12y agoYou perhaps won't be surprised that using layers/absolute positions ends up being faster with Canvas rendering too. Frame by frame is not so much layout calc and mostly painting and composition. I'm now using React and the Flux pattern to use a single source of truth to drive all absolute position math. I very much like the model's performance.
- davedx 12y agoYup. I'm currently working on a React-like interface over WebGL, and everything is just "absolute positioned" - read, it's just GL matrices all the way down. It just works.
- frik 12y agoInteresting! Can you share more about it?
- davedx 12y agoI've done the very basic ground work: https://github.com/davedx/lustro https://github.com/davedx/lustro
- innguest 12y agoWhy am I not surprised to hear that OpenGL "just works" when for years I've been wondering why the clowns at W3C keep pushing for crappy substitutes?
- ender7 12y agoThe addition of "async/await" to ES7 will make things like async DOM APIs practical to use. Until then, you'll be in callback hell forever.
- tree_of_item 12y agoNo, generators + Promises is pretty much exactly the same thing as async/await, and that exists today.