The performance problem was due to me incorrectly mutating the data to the
component. Rather than:
(om/build-all child-component (map (fn [child] (assoc child :selected? (= (:id
child) selected-id) :selected-row-fn (fn [p] (om/set-state! owner :selected-id
(:id p).....)) child-data)
I now do:
(om/build-the-component data
{:fn (fn [p] (assoc data :selected? (= (:id child) ...))
:opts {:selected-row-fn (fn [p] (om/set-state! owner :selected-id (:id
@p)))}})
In other words, the lesson I am learning is that the cursor really wants to be
domain orientated and change as little as often.
Am I right in thinking that for component instance specific immutable data (e.g
is it selected), use :fn. For component class level data use :opts (e.g.
selected callbacks). For global data there is always access to (om/root
{:shared...}) but that isn't applicable in this case?
Thanks.
On Sunday, 2 November 2014 23:29:19 UTC, Mike Haney wrote:
> Sounds like a IE8 issue. I've never seen anything like that low performance,
> even on mobile. Are you using any polyfills or shims?
>
> Check out the section "Browser Support and Polyfills" here:
> http://facebook.github.io/react/docs/working-with-the-browser.html
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.