Tentative conclusion after being burned in performance too many times: Diffing (like in React, but by no means is this unique to React) is a sign that there's something wrong with your framework design.
-
Show this thread
-
-
thanks! agree with the initial statement, though I'd go further: diffing absolutely has a cost, but my understanding is the thing that *really* kills perf in many apps is re-rendering the virtual DOM, not diffing it. there are other ways to achieve a similar programming model
1 reply 0 retweets 2 likes -
The one thing worse than diffing is not diffing and just rerendering everything from scratch :)
1 reply 0 retweets 0 likes -
what I mean is that diffing VDOM at t2 against VDOM at t1 is one source of inefficiency, but having to generate all that VDOM in the first place is the larger problem, because many component render() functions contain lots of wasteful computation/allocation
2 replies 0 retweets 0 likes -
Yes, exactly. We keeping seeing this in browser engines too: generating the display list often takes more time than painting it :( (Unfortunately it’s hard to avoid regenerating it due to the way CSS stacking order works…)
1 reply 0 retweets 2 likes -
oh, interesting! so CSS stacking is problematic for reasons other than being deeply confusing... :)
1 reply 0 retweets 0 likes
Yeah, what Firefox does is walk the layout tree, generate display items, and then sort them into the proper CSS order. It’s either that or walk the tree multiple times, like WebKit does. Neither solution is great :\
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.