cramertj/domafic-rs

Benchmark vs. React

Opened this issue · 1 comments

Hi,
I am trying to figure out if I can do a beanchmark of Domafic to compare performance with React in case of a huge amount of items.

Before I dive into the code, it would only make sense to compare apples to apples, so I'd like to know:

  • Does Domafic do dom diffing and reconciliation like React?
  • Does it do caching based on the input for component (does it even have components?) like React?

I could make the React app not do any caching, but it wouldn't be a very reasonable comparison since in production you want as much caching as possible.

Domafic does do DOM diffing, but it does not have any caching based on input. The equivalent to a React component is either a DomNode or a function that produces a DomNode, depending on how you look at it. It would certainly be possible to implement some kind of caching, but I haven't done so personally.

Let me know what you discover-- I wouldn't be surprised if React is faster to start out with, but it'd be interesting to see which sorts of UI changes React handles better, since that'd tell us specifically what areas we need to optimize.