http-types icon indicating copy to clipboard operation
http-types copied to clipboard

Avoid creating new `ByteString` s

Open winterland1989 opened this issue 9 years ago • 0 comments

While i'm tackling #66 , i found an interesting problem: http-type would create too many ByteString:

  • parseQueryText/parseQuery use urlDecode which create new ByteString s.
  • HeaderItem use CI ByteString which in turn create a case-folded ByteString.

These ByteString s are not created via slice thus will be slow and create memory fragment, i would suggest to simply use Text instead.

winterland1989 avatar Dec 21 '16 13:12 winterland1989