Adventures in Parsec - Making it go faster with attoparsec
variadic.me
variadic.me
I wish your types were more expressive. Using "" to cover up a failure, rather than using Maybe is somewhat of a code smell for me. Similarly, if I were parsing these logs I'd want numeric byte sizes, not strings.
Finally, I was personally thrown for a loop when you talked about using Data.Map, but threw in a Data.HashMap, apparently for performance reasons. Particularly because you continually insert values into the map, which is bad news for Data.Map (should use fromListWith when using it), but is apparently ok with HashMap, although no better than just using Data.HashMap.fromListWith.
I was not aware of the benefits of fromListWith, gonna look into it right away.
Why aren't you using the various combinators from Control.Applicative to build your parsers?
Could your log files possibly contain non-ascii characters? In that case, use the attoparsec module specialized for Data.Text values.