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