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
paulbutcher 2021-05-05T08:23:37.399500Z

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…?

andre 2021-05-15T17:47:43.476Z

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

andre 2021-05-15T17:51:34.476200Z

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

paulbutcher 2021-05-05T08:31:28.399600Z

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

👀 1
Fabim 2021-05-05T16:47:22.405400Z

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-himik 2021-05-05T17:18:27.405500Z

I'd say the latter.

👍 2