Fork me on GitHub
#re-frame
<
2021-04-05
>
rgm22:04:51

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).

p-himik22:04:27

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.

👍 3
rgm22:04:16

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-himik22:04:18

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.

rgm22:04:47

hm, yeah, that could work.

kennytilton01:04:17

I did some modeling with tufte. Seemed excellent.