3 ms·
It’s a shallow comparison, not deep. But yes, there is both computational and memory overhead when using Html.Lazy
by Skinney 5y ago
It’s a shallow comparison, not deep.
But yes, there is both computational and memory overhead when using Html.Lazy
- matsemann 5y agoBut isn't there also that when not using lazy? Instead of checking model equality, elm runtime now has to check shadow dom equality and calculate dom operations to apply. My thought is that my idea isn't obviously worse.
- Skinney 5y agoYes, but lazy adds to that work. So for views that will pretty much always need to be re-rendered (because the only changes are at the bottom of the view hierarchy) then wrapping them in lazy will only slow down the dom recalculation.
- _greim_ 5y ago> It’s a shallow comparison, not deep. Interesting. I thought it was doing a deep comparison, but apparently it uses reference equality, and thus shallow.