somebee / todomvc-render-benchmark

Benchmarking raw DOM reconciliation
http://somebee.github.io/todomvc-render-benchmark/index.html
31 stars 5 forks source link

Vanilla JS example? #2

Open lukeed opened 8 years ago

lukeed commented 8 years ago

Hi there,

Impressive benchmarking system! I played with it this morning and tried to attach the TodoMVC-VanillaJS example.

I managed to render it to the screen and insert most of the API methods' contents, but got hung up on the RENDERCOUNT. =/

Would you mind adding the Vanilla example to this? Would love to see how Imba's JS compares to a JS app from scratch.

(I can send what I've done thus far as a PR, but I'm not certain it's right.)

somebee commented 8 years ago

Sure, send a pull request. But I guess the benchmark isn't really meaningful for any implementation that doesn't work with something like a virtual dom. If you have an implementation that binds to every specific change and updates the view directly at any place you know there should be changes, there's no meaningful way to compare it. The point is to compare framework whose approach is "render the whole thing, I'll figure out what has actually changed, and only tell the real DOM about those things".

lukeed commented 8 years ago

@somebee Sorry, neglected.

isn't really meaningful for any implementation that doesn't work with something like a virtual dom

That makes sense. So never mind.

However!

I'd equally/more interested in comparing Imba to Riot.js, which is also React-inspired with a virtual DOM and another great take on a "micro-React" framework.

I'm not too sure what needs to be done for these benchmarks to work, but here is the Riot TodoMVC.

I'll open a PR in case I happen to stumble across a working implementation.