Fork me on GitHub
#re-frame
<
2021-05-05
>
paulbutcher08:05:37

I’m working on an app which handles a lot of data so my app-db is large (several megabytes). Until recently I’ve been using re-frisk successfully, but suddenly it’s become unusably slow. The change which precipitated this slowdown was that where previously the bulk of the data was in Javascript format (the result of passing a large array to clj->js) I’ve recently changed it so that it’s now a Clojurescript data structure. The slowdown appears to be because re-frisk is now parsing the whole thing every time it tries to do anything? Is there any way of telling re-frisk to ignore a portion of app-db? Or only process it lazily? Or…?

paulbutcher08:05:28

To answer my own question, it looks like the :normalize-db-fn option to re-frisk/enable might be my friend…

👀 3
andre17:05:43

hey @U5KAD4W2E . yes :normalize-db-fn is an option, so re-frisk becomes unusably slow. after upgrade or after changes in your app ?

andre17:05:34

oh ok i see , now you have cljs data in app-db, ok

Fabim16:05:22

Is it best practice to put a js WebSocket in the db or should I keep it in an atom and use a reg-fx :send-data to send the socket payload?

p-himik17:05:27

I'd say the latter.

👍 6