
Le 14 mars 2012 11:44, "Michael Schober"
An "experienced" Haskell programmer would probably reuse some of the "streaming" solutions on Hackage, combine it with md5 and a map :
This seems to be the 'Haskell-way' solution I was looking for. I'm still
in the progress of digging through a lot of material I found ([1-3], links below for other interested readers), but I think that this will be very helpful in the future with similar projects as well.
I have yet to test the code you send me last time, but I will give some
feedback of it as soon as I get the chance.
In my own tests it wasn't very fast : 10min to check a 25GB hierarchy of music files, using 13MB of memory maximum. Though I must admit that I didn't try to find similar tools to compare so I'm not too certain of normal performance times.
Thank you very much! Michael
References: [1] The original conduit article I found: http://www.yesodweb.com/book/conduit [2] Conduits seem to be a development progress originating from
enumerators/iteratee. Therefore, it seems to be a good idea to read up on those prior:
http://www.yesodweb.com/book/enumerator [3] There's also an article in The Monad.Reader, issue 16 about Iteratee: http://themonadreader.wordpress.com/2010/05/12/issue-16/
Good reading ! Though understanding them is not always easy, basic usage of iteratee/conduit/... is not too hard and often deliver pretty nice performance improvements. -- Jedaï