[Haskell-cafe] List x ByteString x Lazy Bytestring

Axman axman6 at gmail.com
Tue Dec 6 05:27:22 CET 2011


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 at gmail.com> wrote:

> Oh, sorry, my bad.
> I misunderstood the dependency.
>
>
> 2011/12/5 Johan Tibell <johan.tibell at gmail.com>
>
>> On Mon, Dec 5, 2011 at 6:09 AM, Yves Parès <limestrael at 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>


-- 
-- Alex Mason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111206/71c86210/attachment.htm>


More information about the Haskell-Cafe mailing list