[Haskell-cafe] zip-archive performance/memmory usage

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Mon Aug 9 20:56:25 EDT 2010


On 10 August 2010 09:29, Pieter Laeremans <pieter at laeremans.org> wrote:
> Hello,
>
> I'm trying some haskell scripting. I'm writing a script to print some
> information
> from a zip archive.  The zip-archive library does look nice but the
> performance of zip-archive/lazy bytestring
> doesn't seem to scale.
>
> Executing :
>
>    eRelativePath $ head $ zEntries archive
>
> on an archive of around 12 MB with around 20 files yields
>
> Stack space overflow: current size 8388608 bytes.
>
>
> The script in question can be found at :
>
> http://github.com/plaeremans/HaskellSnipplets/blob/master/ZipList.hs
>
> I'm using the latest version of haskell platform.  Are these libaries not
> production ready,
> or am I doing something terribly wrong ?

I'm not familiar with the library, but I have a sneaking suspicion
that you're doing something terribly wrong, namely keeping the entire
archive in memory rather than using it lazily.

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list