by localvoid · 11y ago · 0 comments
>Is that argument correct? Is reading the DOM actually not so problematic, as long as the modification you make to it are minimal (which seems to be the strategy here)?
If you want to squeeze out as much "performance" as it is possible, most of the time you'd want to avoid reading DOM (even simple reads, not something that triggers render/layout)
And when it comes to minimal number of modifications, most popular libraries even fail on cases like "moveFromEndToStart or moveFromStartToEnd" (depends on the direction they traverse DOM), they will make N-1 moves.
But in the end all this numbers doesn't matter too much, React is fast enough for most use cases, its community and ecosystem is way more important than numbers in this benchmark.
No comments yet.