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…?
hey @paulbutcher . yes :normalize-db-fn is an option, so re-frisk becomes unusably slow. after upgrade or after changes in your app ?
oh ok i see , now you have cljs data in app-db, ok
To answer my own question, it looks like the :normalize-db-fn
option to re-frisk/enable
might be my friend…
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?
I'd say the latter.