Discussion:
[ClojureScript] Performance difference between Om and Reagent's ToDO MVC exampls
Michiel Borkent
2014-10-27 12:48:59 UTC
Permalink
I just asked this in #clojurescript, but it might be interesting to discuss here.

How come the Reagent Todo MVC example doesn't feel as snappy as the Om version,
or the vanilla JS version for that matter. Om feels closer to the vanilla implementation.

Compare these two

http://holmsand.github.io/reagent/

http://swannodette.github.io/todomvc/labs/architecture-examples/om/

by adding a couple of items very quickly.

Could it be the Reagent example was based on Reagent without batching with requestAnimationFrame?
I can't find where the original sources for these pages are.

Will the examples be hosted on the pages for "reagent-project"?

Kind regards,

Michiel
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.
Rory Douglas
2014-10-28 11:35:15 UTC
Permalink
I didn't personally notice much difference, but here are a few observations:

1) Using the React Chrome Extension, you can see the overall React component tree is much bigger/deeper on the Reagent page, since the entire page is composed of nested React components.

2) I also noticed this in comparing Om vs Reagent for my own top app: every [:div] in Reagent appears to be a component (at least in the React Chrome Extension tree), whereas that's not the case for each Om (dom/div) i.e.

Om:

<SomeComponent>
<div class="bob">
<li>....etc

Reagent:

<SomeComponent>
<:div.bob>
<div class="bob">
<:li>
<li>

I'm not sure if this is just an artifact of how the Chrome Extension renders things, or if there are 2x as many components in a Reagent tree vs Om. If there were, I would suppose that would penalize virtual DOM diffing in Reagent ever so slightly.
Post by Michiel Borkent
I just asked this in #clojurescript, but it might be interesting to discuss here.
How come the Reagent Todo MVC example doesn't feel as snappy as the Om version,
or the vanilla JS version for that matter. Om feels closer to the vanilla implementation.
Compare these two
http://holmsand.github.io/reagent/
http://swannodette.github.io/todomvc/labs/architecture-examples/om/
by adding a couple of items very quickly.
Could it be the Reagent example was based on Reagent without batching with requestAnimationFrame?
I can't find where the original sources for these pages are.
Will the examples be hosted on the pages for "reagent-project"?
Kind regards,
Michiel
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.
Robin Heggelund Hansen
2014-11-11 15:32:08 UTC
Permalink
Post by Michiel Borkent
I just asked this in #clojurescript, but it might be interesting to discuss here.
How come the Reagent Todo MVC example doesn't feel as snappy as the Om version,
or the vanilla JS version for that matter. Om feels closer to the vanilla implementation.
Compare these two
http://holmsand.github.io/reagent/
http://swannodette.github.io/todomvc/labs/architecture-examples/om/
by adding a couple of items very quickly.
Could it be the Reagent example was based on Reagent without batching with requestAnimationFrame?
I can't find where the original sources for these pages are.
Will the examples be hosted on the pages for "reagent-project"?
Kind regards,
Michiel
Posted this question on the official bug tracker, you can see the response from Dan Holmsand (lead dev) there.
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.
Robin Heggelund Hansen
2014-11-11 15:32:38 UTC
Permalink
Post by Robin Heggelund Hansen
Post by Michiel Borkent
I just asked this in #clojurescript, but it might be interesting to discuss here.
How come the Reagent Todo MVC example doesn't feel as snappy as the Om version,
or the vanilla JS version for that matter. Om feels closer to the vanilla implementation.
Compare these two
http://holmsand.github.io/reagent/
http://swannodette.github.io/todomvc/labs/architecture-examples/om/
by adding a couple of items very quickly.
Could it be the Reagent example was based on Reagent without batching with requestAnimationFrame?
I can't find where the original sources for these pages are.
Will the examples be hosted on the pages for "reagent-project"?
Kind regards,
Michiel
Posted this question on the official bug tracker, you can see the response from Dan Holmsand (lead dev) there.
Link is nice: https://github.com/reagent-project/reagent/issues/66
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.
Michiel Borkent
2014-11-11 15:35:53 UTC
Permalink
A lot better now.

On Tue, Nov 11, 2014 at 4:32 PM, Robin Heggelund Hansen
Post by Robin Heggelund Hansen
Post by Robin Heggelund Hansen
Post by Michiel Borkent
I just asked this in #clojurescript, but it might be interesting to discuss here.
How come the Reagent Todo MVC example doesn't feel as snappy as the Om version,
or the vanilla JS version for that matter. Om feels closer to the vanilla implementation.
Compare these two
http://holmsand.github.io/reagent/
http://swannodette.github.io/todomvc/labs/architecture-examples/om/
by adding a couple of items very quickly.
Could it be the Reagent example was based on Reagent without batching with requestAnimationFrame?
I can't find where the original sources for these pages are.
Will the examples be hosted on the pages for "reagent-project"?
Kind regards,
Michiel
Posted this question on the official bug tracker, you can see the response from Dan Holmsand (lead dev) there.
Link is nice: https://github.com/reagent-project/reagent/issues/66
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/sWJxg-2cahQ/unsubscribe.
Visit this group at http://groups.google.com/group/clojurescript.
--
http://www.michielborkent.nl
http://www.eetvoorjeleven.nu
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.
Loading...