Fork me on GitHub
#re-frame
<
2018-10-26
>
mikethompson00:10:54

@danielstockton re-frame-10x can provide some insight to what's going on

👍 2
curlyfry12:10:39

@isak What makes the default behavior crazy? Is there any reason to believe that reg-sub-raw with cursors has less overhead than trivial map lookups?

curlyfry12:10:59

All you need for anything more complicated is a layer 3 sub.

isak14:10:06

@curlyfry yea, just add some printlines and you'll see it. So my thinking is the default thing just adds performance gotchas without any real wins in expressiveness. Yea, you can work around it, but what if you can avoid the problem in the first place?

👍 1
mikerod19:10:33

I don’t think I understand the perf concern completely there

mikerod19:10:09

it’s basically just like reactions that are reactive on top of other reactions, they all do a “if arg values haven’t changed, don’t rerun” sort of check

👍 1
mikerod19:10:40

if you make all subs depend directly on the whole db, then you’d have a bunch of reactions that always have a change incoming (if the db had any change at all)

mikerod19:10:51

but once you start making subs on more subtrees of the db state, then a lot of the “signal graph” is pruned on changes automagically. I may be missing the point though of the conversation though.

kaosko23:10:00

in my little re-frame app, I have data elements that I can edit if I own them and searchable data elements others have created. I can add these elements freely to the calendar and I show a snippet of each in the calendar. the problem I struggle with is what is the right data model to make my data element snippet to update if I edit and save a data element that's already in the calendar. I can either duplicate the data in two places or go through the calendar data shown at the given time to see if one is being edited. not quite happy with either, I'd almost like a subscription that consists of other subscriptions. does that make sense?