W3C home > Mailing lists > Public > public-html@w3.org > September 2010

Re: Putting limits on formatting element growth

From: Maciej Stachowiak <mjs@apple.com>
Date: Tue, 14 Sep 2010 07:04:34 -0700
Cc: HTML WG <public-html@w3.org>, eric@webkit.org
Message-id: <374DF94F-AB63-4DB0-BE32-E6DF5DEF5E0D@apple.com>
To: Henri Sivonen <hsivonen@iki.fi>

On Sep 14, 2010, at 1:05 AM, Henri Sivonen wrote:

>> Here's a test case (not a live link but the source) that caused
>> lengthy hangs in the older WebKit HTML parser:
>> http://trac.webkit.org/browser/trunk/LayoutTests/fast/parser/residual-style-hang.html
> Following links form that commit leads me to a patch that limits the outer loop of the old AAA to 5 iterations.
> Any particular reason why the new implementation limits the outer AAA loop to 10 iterations instead?

5 was an arbitrary choice, I think because there was already another limit of 5 somewhere. It probably could have been higher, any finite limit will prevent unbounded O(N^2) growth. Content that breaks that particular limit is fairly rare in any case, I think.

Received on Tuesday, 14 September 2010 14:05:08 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:04 UTC