News for hackers. Stuff that matters.
Re:How to manage HTML DOM with vanilla JavaScript only? by mosdl on Thursday April 02, 2020 @11:08AM (#22759862)
Diffing isn't really needed - usually you either replace a subtree completely or change a few attributes, which isn't hard to write code for.

Diffing will always be expensive memory wise.

Re:How to manage HTML DOM with vanilla JavaScript only? by aikah on Friday April 03, 2020 @07:23AM (#22768078)
> Diffing isn't really needed - usually you either replace a subtree completely or change a few attributes, which isn't hard to write code for.

Replacing the entire page on model change doesn't work for interactive forms and I don't want to micro-manage every attribute. My model drives the view automatically so diffing is necessary. The memory cost isn't that big if the diff algorithm is implemented efficiently.