It should be related somehow. Although, in my case I'm not dynamically generating protocols or multimethods, the app only generates a plain old functions.
In the ticket it says that there is a way to clear the protocols internal cache. So I'll try to switch my code to generate protocols and test if cleaning internal protocol cache works better. -- Pablo On 05/23/2014 02:24 PM, Andy Fingerhut wrote: > I haven't looked into the details, but you might want to check out this > Clojure ticket to see if it is related: > > http://dev.clojure.org/jira/browse/CLJ-1152 > > Andy > > > On Fri, May 23, 2014 at 8:53 AM, Pablo Nussembaum <bau...@gmail.com > <mailto:bau...@gmail.com>> wrote: > > I have been working hard to understand the issue, and it seems to related > to the creation of lots of functions using eval. > for instance if you run: (for [_ (range 10000)] (eval (read-string "(fn > [x] (inc x))"))) > 2 or 3 time it will consume all PermGen. Is there any way to palliate > this problem? > > As regards head retention, I believe it's not the problem because I run > all my processing in one line[1] the repl without assigning the result to any > var, then I press "1" four times to avoid > the repl retain references in "*1 *2 *3" variables, after that I run > (System/gc) several times and then I take the memory snapshot using yourkit. > Finally, in the mem snapshot there are no live > instances inside mentat.* packages generated by clojure. > > [1] (-> (g/build-dot-file [(t/trace-gen ArrayStack sel-fn)]) d/dot > (d/save! "arrayStack.eps" {:format :eps})) > > Regards, > -- > Pablo > > > On 05/23/2014 02:04 AM, Mars0i wrote: >> >> >> On Wednesday, May 21, 2014 7:43:41 PM UTC-5, Bauna wrote: >> >> The main loop is here[2] in the function trace-gen that generates a >> lazy list. I don't care about the memory required during the execution of >> the function but after it should be GC'd all. >> >> >> Just a quick question: Have you checked to make sure that that you are >> not keeping a reference to the beginning (or other position) of the lazy >> list after you're done processing it? >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clojure@googlegroups.com >> <mailto:clojure@googlegroups.com> >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+unsubscr...@googlegroups.com >> <mailto:clojure+unsubscr...@googlegroups.com> >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> --- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send >> an email to clojure+unsubscr...@googlegroups.com >> <mailto:clojure+unsubscr...@googlegroups.com>. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > <mailto:clojure@googlegroups.com> > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > <mailto:clojure%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com > <mailto:clojure+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com > <mailto:clojure+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.