DescriptionTextAutosizer: avoid unnecessary calls to containerShouldBeAutosized.
This patch adds a simple check to ensure that the multiplier > 1
before calling containerShouldBeAutosized() inside processContainer().
If the multiplier is exactly 1 the return value of
containerShouldBeAutosized does not matter. Due to the cascading
structure of the algorithm quite a few unnecessary calls to
containerShouldBeAutosized are avoided in this way, reducing the text
autosizing times by up to 30% on some websites.
Reduction of measured time spent in text autosizing (in %):
amazon.co.uk - 17%
www.nytimes.com - 27%
www.answers.com - 31%
www.yahoo.com - 16%
http://en.wikipedia.org/wiki/Cat - 9%
BUG=
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165479
Patch Set 1 #
Messages
Total messages: 6 (0 generated)
|