Bug 155087 - Reduce page cache capacity from 3 to 2.
Summary: Reduce page cache capacity from 3 to 2.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2016-03-06 02:58 PST by Andreas Kling
Modified: 2016-03-07 10:32 PST (History)
5 users (show)

See Also:


Attachments
Patch (3.66 KB, patch)
2016-03-06 03:00 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-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.