Thank you for your replies and provided links.
 
Unfortunately, I cannot provide the code as my boss thinks it could provide some extra information - definitely not Haskellish, but other.
 
Nevetheless, your contribution was helpful and I was able to tune the code to get even better perofmance.
 
Moreover, the performance is not big issue - I can process almost one million of files from 40 to 120 seconds, where sizes of files vary from several hundreds of bytes to several hundred of megabytes. I just thought I could improve overall tool-chain performance (several such tools are used in a chain).
 
Thank you very much, I'l try the blaze-builder on the smallest tool and if any interesting outcome apperas I'll let you know.
 
Best regards,
 
  John
 
 
On Tue, Dec 6, 2011, at 03:27 PM, Axman wrote:
I wonder what profiling tells you, you should identify where your performance problems actually are before trying to optimise.
 
Some things that might help are using something like Blaze-Builder[1] to construct your bytestrings for output. I'm hoping that they're sufficiently lazy that you can lazily read in the input, and write output as you've made it available. if you use the blaze-builder-enumerator package, you should be able to get exactly what you want (but probably requires some minor knowledge of iteratees).

Anyway, without seeing your code, we can't easily tell you what's wrong.
 
Cheers,
Alex

[1] http://hackage.haskell.org/package/blaze-builder
[2] http://hackage.haskell.org/package/blaze-builder-enumerator
 
On 6 December 2011 02:11, Yves Parès <limestrael@gmail.com> wrote:
Oh, sorry, my bad.
I misunderstood the dependency.


2011/12/5 Johan Tibell <johan.tibell@gmail.com>
On Mon, Dec 5, 2011 at 6:09 AM, Yves Parès <limestrael@gmail.com> wrote:
However the performance issues seem odd: text is based on bytestring.
 
This is not the case. Text is based on ByteArray#, GHC internal type for blocks of bytes. The text package depends on the bytestring package because it allows you to encode/decode Text<->ByteString.
 
-- Johan
 

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
 


 
--
-- Alex Mason
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

 
-- 
http://www.fastmail.fm - The professional email service