This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-24
Channels
- # admin-announcements (1)
- # aws (3)
- # beginners (52)
- # boot (150)
- # braid-chat (1)
- # braveandtrue (5)
- # bristol-clojurians (2)
- # cider (21)
- # cljs-dev (1)
- # cljsfiddle (1)
- # cljsjs (5)
- # cljsrn (4)
- # clojars (3)
- # clojure (236)
- # clojure-berlin (2)
- # clojure-czech (1)
- # clojure-madison (1)
- # clojure-russia (164)
- # clojure-sdn (1)
- # clojure-sg (2)
- # clojure-uk (64)
- # clojurescript (149)
- # core-async (31)
- # cursive (33)
- # datomic (2)
- # devcards (5)
- # funcool (3)
- # hoplon (142)
- # immutant (27)
- # juxt (7)
- # lein-figwheel (6)
- # liberator (6)
- # off-topic (4)
- # om (46)
- # onyx (26)
- # parinfer (5)
- # perun (56)
- # proton (6)
- # re-frame (19)
- # reagent (1)
- # remote-jobs (12)
- # ring-swagger (17)
- # slack-help (2)
- # spacemacs (11)
- # specter (1)
- # untangled (11)
- # yada (3)
hi, question on memory consumption by core.async processes.
(def in (chan 1 (map (fn [_] (apply str (repeatedly 1000 #(rand-int 10)))))))
=> #'user/in
(def done
(async/go-loop []
(when (<! in)
(recur))))
=> #'user/done
(async/<!! (async/onto-chan in (range 10000000)))
and once it reaches max heap size limits, GC activity and CPU usage will increase significantly
you might be hitting http://dev.clojure.org/jira/browse/ASYNC-138
@alexmiller: That bug should be severity critical, needs some attention
yeah, I bumped it up
the patch looked non-trivial
that was my impression
if someone with context wanted to walk me through more of it, that would be helpful - I can prob do it tomorrow
I have not looked at async tickets in a while and had missed some of the recent activity there
I'll have to re-dig a bit into the core.async emission to be sure, but I remember that that workaround was the only solution I could find -- basically it makes go
close over a thunk wrapping the local rather than closing over the local itself -- then binds that local again from inside the go block, so that clojure's locals clearing analysis can work, manualy bridging fn boundaries
so the transformation is (conceptually) doing: (let [x 1] (fn [] x))
-> (let [x 1 x (^:once fn* [] x)] (fn [] (let [x (x)] x)))
we could use the information available in the AST to do locals clearing in the macro emission
I don't think we can solve it in the general case -- definitely not without additional support from Compiler.java