[Webkit-unassigned] [Bug 122142] New: Release expired pages in the page cache more often

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 30 23:55:18 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=122142

           Summary: Release expired pages in the page cache more often
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: History
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: itoral at igalia.com


Expired pages in the page cache can stay there for quite some time even though they will not be reused again. Currently, as far as I understand the code, these pages will stay in the cache until the page is requested again through the get() method (at which point it will be removed if it has expired) or until the cache is pruned due to the addition of new pages (which will only happen if new pages are loaded that meet the criteria to be stored in the page cache). This creates situations where an expired page can stay in memory for quite some time.

Even though the page cache is typically small in size, cached pages hold references to objects stored in the memory cache, so it probably makes sense to get rid of them early if possible, specially in environments where memory efficiency is particularly relevant and/or the memory cache is small.

If the rationale above makes sense, I can provide a patch to release expired pages more often. Considering that the number of pages in the cache is very small I think it should not have a significant performance penalty to check for expired pages on frequently used methods. I'd suggest doing it when calling canCache() since I think this would make sure that we release expired pages at least every time we load a new page, but it is currently a const method so maybe you have other preferences.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list