On Mon, Apr 9, 2012 at 10:05 PM, Andy Wu <icetorto...@gmail.com> wrote:
> (def int-vec (with-open [rdr (clojure.java.io/reader "<file name>")]
>                           (doall (map convert (line-seq rdr)))))

This will convert all 5 million lines to a 5 million element vector of
vector pairs. That's certainly a lot of memory, and you're holding on
to it all.

> Can someone advice me what would be a ideal way to handle this case in
> clojure?

It really depends what you want to do with the big vector...
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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

Reply via email to