[webkit-dev] Writing a new XML parser with no external libraries

paroga at paroga.com paroga at paroga.com
Wed Jun 29 07:18:20 PDT 2011


On Wed, 29 Jun 2011 06:55:57 -0700, Alex Milowski <alex at milowski.org>
wrote:
> I know the parser's speed is terrible as I've measured it recently.
> This is partially due to some of the things we are doing to deal with
> Unicode decoding to work around libxml2 issues.  I think moving to
> native strings and decoding would improve the speed by a huge amount.
> It would be well work it to some to fix this.

With the same UTF-8 content the libxml2 parser is _faster_ than our HTML
parser:
https://bugs.webkit.org/show_bug.cgi?id=52036#c1

I don't think that there is a huge difference between the HTML and XML
parser, so comparing should be ok in this case.

After my (simple) performance tests I still think that parsing UTF-8 is
better than UTF-16, since it usually has only half of the memory size.

- Patrick


More information about the webkit-dev mailing list