Bug 154986 - Drop DocumentSharedObjectPool immediately when going into PageCache.
Summary: Drop DocumentSharedObjectPool immediately when going into PageCache.
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
Keywords: Performance
Depends on:
Reported: 2016-03-03 15:32 PST by Andreas Kling
Modified: 2016-03-24 19:25 PDT (History)
4 users (show)

See Also:

Patch (2.90 KB, patch)
2016-03-03 15:32 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2016-03-03 15:32:20 PST
We can reclaim ElementData memory sooner if we drop the DocumentSharedObjectPool the instant we go into PageCache.
Comment 1 Andreas Kling 2016-03-03 15:32:57 PST
Created attachment 272780 [details]
Comment 2 Antti Koivisto 2016-03-03 15:39:21 PST
Comment on attachment 272780 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=272780&action=review

> Source/WebCore/dom/Document.cpp:5049
> -void Document::sharedObjectPoolClearTimerFired()
> +void Document::clearSharedObjectPool()

I often keep *TimerFired function that just calls a payload function. Makes it easier to see what is what.
Comment 3 WebKit Commit Bot 2016-03-04 01:02:51 PST
Comment on attachment 272780 [details]

Clearing flags on attachment: 272780

Committed r197552: <http://trac.webkit.org/changeset/197552>
Comment 4 WebKit Commit Bot 2016-03-04 01:02:55 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Chris Dumez 2016-03-21 15:07:36 PDT
Reverted r197552 for reason:

May have caused a ~2% PLT regression on iOS

Committed r198500: <http://trac.webkit.org/changeset/198500>
Comment 6 Chris Dumez 2016-03-24 19:24:53 PDT
Reverted r198500 for reason:

Roll back in r197552 as it did not seem to cause a PLT regression after all

Committed r198658: <http://trac.webkit.org/changeset/198658>
Comment 7 Chris Dumez 2016-03-24 19:25:59 PDT
Re-landed in r198658 as it does not seem it caused a PLT regression after all. Sorry about the noise.