3 ms·
I had a problem with perf optimization on Html.Lazy long time ago that I can't solved before I moved on. Since Elm is immutable and lazy render, most of the ti
by Existenceblinks 5y ago
I had a problem with perf optimization on Html.Lazy long time ago that I can't solved before I moved on.
Since Elm is immutable and lazy render, most of the time, compare underline object reference (referential equality check), the reference (memory location) almost always changes on every update cycle because it needs to update model, thus, a new reference as a result. And that makes Html.Lazy worthless. I had some kind of 1000 html tree nodes, and it rendered every branch every time. I probably did something not right, but I already tried solving that for a few days, no success.
If you have the Elm in Action book, that memory location pitfall is explained on the very last page about when memory location of a object changes.