Bug 155087

Summary: Reduce page cache capacity from 3 to 2.
Product: WebKit Reporter: Andreas Kling <kling>
Component: WebCore Misc.Assignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, cdumez, commit-queue, kling, koivisto
Priority: P2 Keywords: Performance
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andreas Kling 2016-03-06 02:58:34 PST
Reducing page cache capacity is very effective at reducing heap fragmentation on iOS.
Comment 1 Andreas Kling 2016-03-06 03:00:52 PST
Created attachment 273134 [details]
Patch
Comment 2 Antti Koivisto 2016-03-06 03:04:58 PST
Comment on attachment 273134 [details]
Patch

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

> Source/WebKit2/Shared/CacheModel.cpp:68
>          // Page cache capacity (in pages)
> -        if (memorySize >= 1024)
> -            pageCacheCapacity = 3;
> -        else if (memorySize >= 512)
> +        if (memorySize >= 512)
>              pageCacheCapacity = 2;
>          else if (memorySize >= 256)
>              pageCacheCapacity = 1;

Is ToT WebKit used on devices will less than 512MB of RAM? Can all of this be replaced with "pageCacheSize = 2"
Comment 3 Andreas Kling 2016-03-06 03:05:51 PST
(In reply to comment #2)
> Comment on attachment 273134 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=273134&action=review
> 
> > Source/WebKit2/Shared/CacheModel.cpp:68
> >          // Page cache capacity (in pages)
> > -        if (memorySize >= 1024)
> > -            pageCacheCapacity = 3;
> > -        else if (memorySize >= 512)
> > +        if (memorySize >= 512)
> >              pageCacheCapacity = 2;
> >          else if (memorySize >= 256)
> >              pageCacheCapacity = 1;
> 
> Is ToT WebKit used on devices will less than 512MB of RAM? Can all of this
> be replaced with "pageCacheSize = 2"

:|
Comment 4 Andreas Kling 2016-03-06 03:15:17 PST
Let's leave that logic in there for now, since we still have other ports that run on more constrained systems.
Comment 5 WebKit Commit Bot 2016-03-06 04:04:21 PST
Comment on attachment 273134 [details]
Patch

Clearing flags on attachment: 273134

Committed r197638: <http://trac.webkit.org/changeset/197638>
Comment 6 WebKit Commit Bot 2016-03-06 04:04:25 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Chris Dumez 2016-03-07 10:31:56 PST
While I can understand the appeal on iOS, isn't this overly aggressive on OS X? We have data showing that navigating 3 hops back is not that uncommmon.