I don't think you will be able to do a parallel fold on a lazy-seq which
is what clojure.data.xml/parse returns. Vectors are the only persistent
collection that supports parallel fold and something tells me it's
because they are NOT lazy...
why can't you 'vec' the result of xml/parse and then use fold on that?
Is it a massive seq?
Jim
On 11/03/13 00:40, Paul Butcher wrote:
As things currently stand, fold can be used on a sequence-based
reducible collection, but won't be parallel.
I'm currently working on code that processes XML generated by
clojure.data.xml/parse, and would love to do so in parallel. I can't
immediately see any reason why it wouldn't be possible to create a
version of CollFold that takes a sequence and "chunks" it so that it
can be folded in parallel. Has anyone tried this yet? Is there some
gotcha lurking to catch me out?
--
paul.butcher->msgCount++
Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?
http://www.paulbutcher.com <http://www.paulbutcher.com/>/
LinkedIn: http://www.linkedin.com/in/paulbutcher
MSN: p...@paulbutcher.com <mailto:p...@paulbutcher.com>
AIM: paulrabutcher
Skype: paulrabutcher
--
--
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/groups/opt_out.
--
--
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/groups/opt_out.