re-frame

https://github.com/Day8/re-frame/blob/master/docs/README.md https://github.com/Day8/re-frame/blob/master/docs/External-Resources.md
rgm 2021-04-05T22:08:51.119800Z

Hi all … I’m using https://github.com/ptaoussanis/tufte to do some profiling of a slow re-frame app. I’m suspecting it’s my subscription handlers. I’m wondering if there’s a single convenient place to wrap a (profile {} ,,,) block. My plan is to collect some stats across epochs, so I’d like to go a little further than what’s in 10x. (Or at least, what I’m aware’s in 10x).

kennytilton 2021-04-12T01:42:17.164200Z

I did some modeling with tufte. Seemed excellent.

p-himik 2021-04-05T22:11:27.120Z

Absolutely zero clue about tufte and how to do it in code - FWIW, personally, I would just use the browser's built-in profiler. Usually, works like a charm.

1👍
rgm 2021-04-05T22:13:16.120400Z

thanks … my possibly far-fetched idea was to wire up tufte so that I could collect timing bundles from testers’s browsers too, since tufte lets you do whatever you want with the collected stats (print, ship to an endpoint, whatever).

p-himik 2021-04-05T22:15:18.120600Z

Ah, right. Hmm, I can't think of any way other than a custom version of reg-sub that wraps re-frame.core/reg-sub and also calls profile on the handler function.

rgm 2021-04-05T22:15:47.120800Z

hm, yeah, that could work.

rgm 2021-04-05T23:53:25.121Z

Not necessarily related to the cljc, but I was surprised to discover it works great in a webworker. You can’t touch the DOM, but it’s still a disciplined way to organize state mutation. Can’t recall if I tried any subs.