I think I've been able to duplicate your results with a simpler
example.

I first tried this:

(defn splode [n]
  (with-local-vars [doc-count 0]
    (doseq [document (filter #(= % 1) (range n))]
      (var-set doc-count (inc @doc-count)))
    'done))

and it doesn't blow up with (splode 1000000000).

Next, I tried this (since your app filters the seq from a map):

(defn splode2 [n]
  (with-local-vars [doc-count 0]
    (doseq [document (filter #(= % 1) (map inc (range n)))]
      (var-set doc-count (inc @doc-count)))
    'done))

and it blows up (out of memory) with (splode2 10000000)

So it seems that (filter pred (map ...)) is the issue.



--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to