Changelog for blaze-builder-0.2.1.0If this renders badly as markdown, see the plain text version
Incorporated several design changes:
- Writable buffer range is now represented in a packed form. This improves speed slightly, as less currying is used.
- Writes are abstracted such that their internal representation can be exchanged without breaking other library code.
- Writes are represented in a form that allows for efficient monoid instances for branching code like UTF-8 encoding. For single character encoding this results currently in a slight slowdown due to GHC not recognizing the strictness of the returned value. This will be fixed in the future.
- BuildSteps support returning a result in
Done, which enables to implement a
Putmonad using CPS.
- chunked list writes were removed, as they result in worse performance when writing non-trivial lists. (cf. benchmarks)
- An internal buffering abstraction is introduced, which is used both
by the adaption of the
binarypackage, as well as by the
blaze-builder-enumerateepackage, to execute puts and builders. It will be used later also by the execution functions of the
Implemented new functionality
Blaze.ByteString.Builder.HTTPprovides a builder transformer for doing in-buffer chunked HTTP encoding of an arbitary other builder.
Blaze.ByteString.Builder.Char8provides functions to serialize the lower 8-bits of characters similiar to what
Data.ByteString.Char8provides for bytestrings.
Loosen 'text' dependency to '>= 0.10 && < 0.12'
Fixed bug: use ' instead of ' for HTML escaping '
Added a missing benchmark file.
Heavily restructured 'blaze-builder' such that 'Blaze.ByteString.Builder' serves as a drop-in replacement of 'binary:Data.Binary.Builder' which it improves upon with respect to both speed as well as expressivity. See the documentation and the benchmarks for details on improvements and new functionality.
Changed module structure: Blaze.ByteString.Builder.Core -> Blaze.ByteString.Builder Blaze.ByteString.Builder.Utf8 -> Blaze.ByteString.Builder.Char.Utf8 Blaze.ByteString.Builder.Html -> Blaze.ByteString.Builder.Html.Utf8
Changed function names: writeByte -> writeWord8 fromByte -> fromWord8 fromWriteList -> fromWrite1List
Possibly performance sensitive implementation changes:
- 'fromByteString' and 'fromLazyByteString' check now if a direct insertion of the bytestring(s) would be cheaper than copying it. See their documentation on how to recover the old behaviour.
Deprecated functions: 'empty' : use 'mempty' instead 'singleton': use 'fromWord8' instead 'append' : use 'mappend' instead
This is the first version of 'blaze-builder'. It is explicitely targeted at fast generation of UTF-8 encoded HTML documents in the 'blaze-html' and the 'hamlet' HTML templating libraries.