
1 Feb
2013
1 Feb
'13
3:04 p.m.
On 02/01/2013 01:44 PM, Bas van Dijk wrote:
If I make a special case for text based UUIDs in aeson:
data Value = ... | UUID Text | ...
Data.Aeson.Encode.fromValue (UUID s) = singleton '"' <> fromText s <> singleton '"'
Then encoding time improves by 20%.
So a big part of the time is spent encoding the UUID strings.
Bas
This might work, but it doesn't seem to be something I could actually distribute, unless I shipped modified Aeson source code... the String fromValue pattern seems to do a lot of escaping which won't apply to my UUIDs, but I'm not sure what the right solution to that is. - Ocharles