Shink HTMLToken by 1.5 kB
Shink HTMLToken by 1.5 kB

HTMLToken has an inline vector for buffering characters during tokenization. We
originally picked the inline capacity of this buffer somewhat arbitrarily. This
CL tunes the number based on a somewhat non-scientific browse of a number of
popular web sites.

I instrumented content_shell to log the length of each complete DataVector. I
then browsed around a variety of web sites to collect data. The 99% percentile
of DataVector lengths was just shy of 250 characters. I rounded that up to 256
because powers of two are pretty. That means we'll malloc an external buffer
less than 1% of the time, which seems fine.

R=eseidel,tonyg
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/15706004

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@151046 bbb929c8-8fbe-4397-9dbb-9b2b20218538

primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs