Hacker News new | ask | show | jobs
by tixzdk 3672 days ago
I'll leave this module here for those of you how haven't heard of it. https://github.com/patrick-steele-idem/morphdom

It diff's the DOM instead of a VDOM

2 comments

Thus it can be estimated that you can get, on average, a 45% speed improvement?!

I'm going to try and bench this on a mobile webview and see what happens.

Where are you getting that number? The benchmarks in the readme show morphdom being much slower for several operations.
5 out of 31? And I'd say only 3 are noticeably slower, and only 1 seems to be "much" slower (at 0.38ms). But given that just about everything benchmarked seems to be sub-0.05ms, I'm left thinking that gaining noticeable and much-increased performance is highly dependent on operations, and a high-precision timer. Humans aren't going to notice a difference between an operation lasting 0.04ms vs 0.02ms. Unless a ton of operations add up to something noticeable, of course.

After looking into it further, morphdom appears to be a solid alternative to virtual DOMs. Seems worth having around for that reason alone, especially if it were to improve with time, or become used by other tools.

Whoa, that's pretty cool. Hadn't heard of it, but sure want to play with it.