This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
I just got a very quick and dirty server side pre-rendering working with nodejs, reagent, re-frame doing ajax calls. \o/
hi all - any suggestions for profiling a clojurescript app? I am trying to answer “can I process these thousands of tiny events on the UI instead of the server”...
@colin.yates: have you looked at the Chrome devtools?
@danielcompton: Hiya, not spoken for a while . Yes, I find them invaluable for the console and investigating the DOM but I don’t find the performance profiling aspect of them particularly useful… I just end up with a whole bunch of non-application references .
I think the answer to your question about handling lots of events in the UI is “it depends"
At the moment, you’ll probably need to do some preprocessing/batching of the events before you dispatch them to re-frame
Depending on what your event/sec rate is
They are really useful - thanks Daniel. The app will start off with a single batch of events (which it can chunk internally), after that it will be no-more than say 10 events a second so I think that is fine. It was just that the initial batch might be thousands.
essentially it will be (reduce some-fn-that-conds-on-key [big-batch-of-events])
sounds like that should be fine
and I can time that in Chrome but I wondered whether there was a criterium style library.
it needs to be ‘fast’ enough for a wide range of machines including old and dilapitated ones.
I shall read those in detail - thanks again Daniel.
Not sure if there’s something like Criterium for clojurescript
I’m also not sure how relevant it would be for your use case where I imagine the code will start running straight away so it won’t have time to get through the tiered compilation
(caveat, I know almost nothing about JS JIT optimisation)
no, me neither.
I might look at doing the initial compute on the server if possible?
I was thinking of getting a page which a set of representative machines could load which would simply print out some stats, the result of something like criterium
it is on the server ATM but the great thing of running the events on the client is that stepping back in time is trivial .
And these events are domain events as well so the world just got really nice
Hot off the press
gotta run - going to my 8 year old’s birthday party - rock on!
@simax Not arbitrarily. Input-text, for example, doesn't support :children, unlike h-box or v-box. But you could set an input-text and a button as :children of an h-box. That's roughly what input-time does, although it just uses a glyph to indicate the interaction model. rather than a button.