3 ms·
One problem I notice with both RXJS and even this one is that in reactive programming a lot of (filter - select) is used. Doing (filter - select) for large vie
by wrong_variable 11y ago
One problem I notice with both RXJS and even this one is that in reactive programming a lot of (filter - select) is used.
Doing (filter - select) for large views seems an inefficiency - no different than the old way where we walk the DOM trees.
- EvanPlaice 11y agoIncremental DOM updates cause layout thrashing which, when comlared to making a few additional passes over a set, is a couple of orders of magnitude more expensive. The point is, walk/filter the data completely prior to updating the view. Immutable sets may also 'seem' inefficient but compare-by-reference works a of a lot faster than change propogation with compare-by-deeply-nested-values. In CompSci terms, multiple passes are still O(n) and the data sets aren't large enough for micro-optimizations to matter. Compared to O(holy shit) of triggering many cascading DOM updates, it's a huge improvement. 'Seems' isn't a good enough metric to justify optimization.
- wrong_variable 11y agoI am curious to know what you mean by Incremental DOM updates. Are you talking about changing values of DOM elements,etc. Or are you talking about destroying elements in DOM and creating new ones ?