Re: Out of Memory Error

2013-11-12 Thread Cedric Greevey
Yeah, rewrite that to not hold the head of "lines". In particular, get rid of "counts" entirely, get rid of "(nth lines ...)", and use something like (loop [lines (seq lines) res {}] (if lines (recur (next lines) (update-res res (first lines))) res)) as your loop. On Tue, Nov

Re: Out of memory on spit

2013-08-07 Thread Moritz Ulrich
Just a guess: You put 500 (or so) actions to the internal agent queue and the agent isn't fast enough to keep up. The queue grows very fast and goes out of memory. On Wed, Aug 7, 2013 at 3:09 PM, Jérémie Campari wrote: > Hello ! > > I don't understand why my code raise an Out of memory except

Re: Out of memory using pmap

2011-08-06 Thread Colin Yates
The point is that sequentially the GC gets to remove stale entries so simplistically only 3000 records are in memory at any one time, in parallel processing all 9 can be in memory at the same time. Sent from my iPad On 6 Aug 2011, at 21:34, Shoeb Bhinderwala wrote: > You didn't understand m

Re: Out of memory using pmap

2011-08-06 Thread Shoeb Bhinderwala
You didn't understand my problem. The exact same code throws out of memory when I change map to pmap. My monthly data is evenly divided into 30 sets. For e.g total monthly data = 9 records, daily data size for each day = 3000 records. I am trying to achieve performance gain by processing the d

Re: Out of memory using pmap

2011-08-06 Thread Sunil S Nandihalli
Just a guess. If your daily data is huge you will be loading the data for only one day when using map and you will be loading the data for multiple days (equal to number of parallel threads) .. and may be this is the cause of the problem. Sunil. On Sat, Aug 6, 2011 at 11:40 PM, Shoeb Bhinderwala

Re: Out of memory

2010-12-23 Thread David Nolen
On Thu, Dec 23, 2010 at 11:29 AM, Paul Mooser wrote: > So, doesn't this represent a bug at least ? I'm sometimes confused > when this sort of issue doesn't get more attention, and I'm uncertain > what the process is for filing a bug, since my impression is that we > are supposed to have issues va

Re: Out of memory

2010-12-23 Thread Paul Mooser
So, doesn't this represent a bug at least ? I'm sometimes confused when this sort of issue doesn't get more attention, and I'm uncertain what the process is for filing a bug, since my impression is that we are supposed to have issues validated by discussion on the group before filing an actual tic

Re: Out of memory

2010-12-22 Thread Ken Wesson
On Wed, Dec 22, 2010 at 6:38 PM, David Nolen wrote: > On Wed, Dec 22, 2010 at 6:10 PM, Ken Wesson wrote: >> >> On Wed, Dec 22, 2010 at 6:08 PM, Chris Riddoch wrote: >> > On Wed, Dec 22, 2010 at 3:46 PM, David Nolen >> > wrote: >> >> A entire collection of 5e7 *objects* is being realized into me

Re: Out of memory

2010-12-22 Thread David Nolen
On Wed, Dec 22, 2010 at 6:10 PM, Ken Wesson wrote: > On Wed, Dec 22, 2010 at 6:08 PM, Chris Riddoch wrote: > > On Wed, Dec 22, 2010 at 3:46 PM, David Nolen > wrote: > >> A entire collection of 5e7 *objects* is being realized into memory as it > is > >> being reduced down to a single value to be

Re: Out of memory

2010-12-22 Thread Ken Wesson
On Wed, Dec 22, 2010 at 6:08 PM, Chris Riddoch wrote: > On Wed, Dec 22, 2010 at 3:46 PM, David Nolen wrote: >> A entire collection of 5e7 *objects* is being realized into memory as it is >> being reduced down to a single value to be stored into a var. I would expect >> this to perform poorly in a

Re: Out of memory

2010-12-22 Thread Chris Riddoch
On Wed, Dec 22, 2010 at 3:46 PM, David Nolen wrote: > A entire collection of 5e7 *objects* is being realized into memory as it is > being reduced down to a single value to be stored into a var. I would expect > this to perform poorly in any language. Range doesn't return a lazy seq? Or reduce so

Re: Out of memory

2010-12-22 Thread David Nolen
On Wed, Dec 22, 2010 at 5:32 PM, Chris Riddoch wrote > > If the workarounds mentioned actually work (I haven't tried) I really > don't understand why. This *looks* like a genuine bug to me, but I > really don't know Clojure's internals well enough (yet) to be able to > have the slightest hint wh

Re: Out of memory

2010-12-22 Thread Chris Riddoch
On Wed, Dec 22, 2010 at 9:54 AM, Laurent PETIT wrote: > 2010/12/22 Jeff Palmucci >> >> I've worked around this sort of thing in the past by wrapping the >> initialization in a closure. My macros: > > Couldn't just it be a wrap with (let [] ), and let the choice of running it > once or not by choo

Re: Out of memory

2010-12-22 Thread Laurent PETIT
2010/12/22 Jeff Palmucci > I've worked around this sort of thing in the past by wrapping the > initialization in a closure. My macros: > > (defmacro once-fn "Define a function that should only be called once. > Releases local storage earlier" > [args & body] > `(^{:once true} fn* ~args ~...@bod

Re: Out of memory

2010-12-22 Thread Jeff Palmucci
I've worked around this sort of thing in the past by wrapping the initialization in a closure. My macros: (defmacro once-fn "Define a function that should only be called once. Releases local storage earlier" [args & body] `(^{:once true} fn* ~args ~...@body)) (defmacro top-level-run "work aro

Re: Out of memory

2010-12-21 Thread Laurent PETIT
2010/12/21 Tim Robinson > You may want to consider the heap size you have allocated to java. I > believe the default is 128. > > For example you can set this yourself: > > java -Xms256m -Xmx1024m > Indeed, but in this example, there is a problem. As Ken said, it seems that the "locals clearing"

Re: Out of memory

2010-12-21 Thread Tim Robinson
You may want to consider the heap size you have allocated to java. I believe the default is 128. For example you can set this yourself: java -Xms256m -Xmx1024m This provides 256mb initial heap and permits heap to grow to 1024mb. I've been using Leiningen, so in my case I just changed the settin

Re: Out of memory

2010-12-21 Thread Ken Wesson
On Tue, Dec 21, 2010 at 9:09 AM, Miles Trebilco wrote: > Why does this cause an out of memory error: > > (def out_of_mem >  (reduce + 0 (range 5000))) > > while this does not: > > (def not_out_of_mem >  (let [result 0] >  (reduce + result (range 5000 > > and neither does this in the RE