choojs / choo

:steam_locomotive::train: - sturdy 4kb frontend framework
https://choo.io/
MIT License
6.78k stars 595 forks source link

Benchmarks #492

Open yoshuawuyts opened 7 years ago

yoshuawuyts commented 7 years ago

Would be cool if we worked with benchmark people to find pain points. If people want to help out, there's an open issue here: https://github.com/krausest/js-framework-benchmark/issues/171 :tada:

yoshuawuyts commented 7 years ago

Results from choo 5 are here: https://rawgit.com/krausest/js-framework-benchmark/2923130afd1f85627ecac49fb9464dfa716fcbe4/webdriver-ts/table.html

We're doing quite well on the memory side of things (super low overhead compared to vanilla DOM):

screen shot 2017-05-18 at 12 57 33

But not so good in terms of CPU:

screen shot 2017-05-18 at 12 57 50

Feel like with some basic optimizations (e.g. DOM node caching) we could find a better balance between the two (:

douglasduteil commented 7 years ago

Hi there @yoshuawuyts

By adding choo@6 to krausest/js-framework-benchmark I might did a some baaaad publicity sorry :open_mouth:

rawgit com_krausest_js-framework-benchmark_15f11036046f06fa9de8cbf07dbac36a72c2e767_webdriver-ts-results_table html 3

Let me know how can I help :)

yoshuawuyts commented 7 years ago

Heya! — no worries haha; I'm not too worried about this benchmark, because in real-world scenarios we tend to have fewer re-renders than most alternatives.

The benchmark is probably right tho; we especially know that updating lots of sibiling nodes can be rather slow (which is the biggest metric in this benchmark). When there's lots of node in a tree, like in most applications, the results will probably be more similar.

That said, we do have plans to improve this. We're currently working on an update to our diffing algorithm, so updates on long lists of sibling nodes become more efficient. Check out https://github.com/choojs/nanomorph/issues/85 to track progress.

So thanks a lot for updating the benchmark! — I suspect it might need to be updated once again in the near future :P

On Thu, Oct 26, 2017 at 2:14 PM Douglas Duteil notifications@github.com wrote:

Hi there @yoshuawuyts https://github.com/yoshuawuyts

By adding choo@6 to krausest/js-framework-benchmark https://github.com/krausest/js-framework-benchmark/pull/260 I might did a some baaaad publicity sorry 😮

[image: rawgit com_krausest_js-framework-benchmark_15f11036046f06fa9de8cbf07dbac36a72c2e767_webdriver-ts-results_table html 3] https://user-images.githubusercontent.com/730511/32054806-f4daee2a-ba5f-11e7-9ae8-380f5099a70a.png

Let me know how can I help :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/choojs/choo/issues/492#issuecomment-339661774, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWleq1VUO6BnXQIXJcO4yNfpBM4lsr_ks5swIWugaJpZM4NfDcj .