NEW 114894
RenderText::computePreferredLogicalWidths use of isBreakable() is inefficient
https://bugs.webkit.org/show_bug.cgi?id=114894
Summary RenderText::computePreferredLogicalWidths use of isBreakable() is inefficient
Glenn Adams
Reported 2013-04-19 18:27:25 PDT
RenderText::computePreferredLogicalWidths uses isBreakable() twice, each time ignoring the nextBreakable out parameter. Since isBreakable(), by mapping to nextBreakblePosition(), iterates forward to the next break point rather than simply determining if the specified position is breakable, it performs unneeded and unused computation, e.g., by repeatedly calling textBreakFollowing() which maps (on ICU platforms) to ubrk_following(). I propose a variant of isBreakable() that doesn't take a nextBreakable parameter be used in these two cases in computePreferredLogicalWidths, which would use a simplified form of nextBreakablePosition that only checks if the specified position is breakable.
Attachments
Note You need to log in before you can comment on or make changes to this bug.