This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-21
Channels
- # announcements (1)
- # architecture (1)
- # beginners (125)
- # boot (6)
- # boot-dev (2)
- # calva (69)
- # cider (38)
- # cljs-dev (3)
- # clojure (212)
- # clojure-austin (7)
- # clojure-australia (1)
- # clojure-denver (2)
- # clojure-europe (3)
- # clojure-gamedev (1)
- # clojure-hamburg (8)
- # clojure-italy (10)
- # clojure-nl (31)
- # clojure-russia (3)
- # clojure-uk (57)
- # clojurescript (56)
- # core-async (3)
- # cursive (15)
- # datascript (1)
- # duct (28)
- # emacs (6)
- # events (1)
- # figwheel-main (11)
- # fulcro (22)
- # luminus (59)
- # lumo (2)
- # onyx (4)
- # overtone (1)
- # re-frame (1)
- # reagent (4)
- # remote-jobs (3)
- # rum (2)
- # shadow-cljs (84)
- # spacemacs (7)
- # speculative (5)
- # vim (1)
- # yada (127)
I've been using fulcro for a webGL app, and recently added WebSockets to push some real-time data. It's not a whole lot, but eventually the browser would often aw-snap
with memory issues. When inspecting the memory allocations with DevTools I noticed fulcro history popped up on a big chunk of the objects. I moved away from using mutations and started directly updating the state atom and so far it seems that solved the issue.
Maybe there is a way to mark a mutation to not be added to history? And if this is the expected thing to do with big amounts of data that shouldn't be in history it might be useful to have a comment on that in the fulcro book.
Caveat that by saying I'm not entirely sure it's resolved, but so far it does look like it reduced memory consumption significantly.
@bbss I don’t think you want to swap the atom directly, for one mutations get batched together and use requestAnimationFrame to give you better UI performance while mutations are happening
do you have a large number of rapid mutations?
have tried compressible mutations?
also history has a max-size config
which i believe you can configure in :reconciler-options
when you create the fulcro app
:history
and it defaults to 200
you can override that to be whatever you want
@currentoor thanks for the suggestions! I did see the history option, will give that a shot. It updates around once per second.
@bbss let me know if the history stuff has any problems…I don’t know that anyone has ever tried playing with it much.
Given the reference to this
within a component defined in defsc
, how can I retrieve the class for it?
Can’t find it 😞
Good evening 🙂 Quick q: is it possible to use Hiccup-style markup with Fulcro? (like with Reagent)
Well, I should rephrase. Surely it’s possible by doing some wrapping, but is support for it built-in?