[Webkit-unassigned] [Bug 31266] New: [Qt] QWebSettings::setMaximumPagesInCache(int pages) does not enable the Page Cache

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 9 11:20:49 PST 2009


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

           Summary: [Qt] QWebSettings::setMaximumPagesInCache(int pages)
                    does not enable the Page Cache
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P3
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: becsi.andras at stud.u-szeged.hu
                CC: tonikitoo at webkit.org, kenneth at webkit.org


Created an attachment (id=42772)
 --> (https://bugs.webkit.org/attachment.cgi?id=42772)
proposed patch for further discussion

Calling setMaximumPagesInCache(somePositiveInt) does not enable the Page Cache
(http://webkit.org/blog/427/webkit-page-cache-i-the-basics/) which is disabled
by default in QtWebKit.
Further more QWebSettings::setMaximumPagesInCache(int pages) is static, so
calling d->settings-setUsesPageCache(true) if pages>0 is not an option.
To support page caching in a comparative way and quality as the other ports do,
we would need a nice cross platform way to measure the available system memory
and calculate the page cache capacity in a similar way as the Mac and Win ports
do:

Eg.: WebKit/win/WebView.cpp:502:
        // Page cache capacity (in pages)
        // (Research indicates that value / page drops substantially after 3
pages.)
        if (memSize >= 2048)
            pageCacheCapacity = 5;
        else if (memSize >= 1024)
            pageCacheCapacity = 4;
        else if (memSize >= 512)
            pageCacheCapacity = 3;
        else if (memSize >= 256)
            pageCacheCapacity = 2;
        else
            pageCacheCapacity = 1;

But in embedded devices memory is a precious resource, so there may be
situations where caching has to be disabled completely. 
So we would have to guess somehow which setting would be best, or leave the
whole decision to the programmer? 

The attached patch tries the second approach and adds methods to qwebsetting
and documents the usage and co-relation to setMaximumPagesInCache().

It would be nice to get some input on that issue.

-- 
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