Den 9/9/2015 06:32, Kentaro Hara skreiv:
> OK, now I identified the root cause. It is Document::m_ranges.
>
> - textarea-edit.html allocates a lot of Ranges. They are registered to
> Document::m_ranges, which is a hash set of weak members.
> - Most of the Ranges die shortly.
> - However, with oilpan, those Ranges are not unregistered from the
> Document::m_ranges until the next GC hits.
> - When doing layout (or something), we need to iterate the
> Document::m_ranges. The iteration becomes slower and slower until the
> next GC unregisters the Ranges from the Document::m_ranges. This causes
> the performance regression.
>
> It seems that this is the main cause of the following regressions:
>
> 14% regression in div-editable.html
> 13% regression in textarea-dom.html
> 26% regression in textarea-edit.html
>
> I think we can fix the regression by replacing problematic Range objects
> with EphemeralRanges
> (
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/editing/EphemeralRange.h&q=ephemeralrange&sq=package:chromium&type=cs&l=38),
> but I haven't yet studied what the problematic Range objects are. Maybe
> it would make more sense to just unship Oilpan from Ranges (maybe this
> is a bad idea since it will increase the number of persistent handles).
>
> Would anyone have a bandwidth to take a look at this?
>