WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
48706
Factor calculation of cache sizes based on cache model into shared function.
https://bugs.webkit.org/show_bug.cgi?id=48706
Summary
Factor calculation of cache sizes based on cache model into shared function.
Sam Weinig
Reported
2010-10-29 19:20:16 PDT
Factor calculation of cache sizes based on cache model into shared function.
Attachments
Patch
(23.24 KB, patch)
2010-10-29 19:21 PDT
,
Sam Weinig
aroben
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2010-10-29 19:21:36 PDT
Created
attachment 72426
[details]
Patch
Adam Barth
Comment 2
2010-10-29 23:14:38 PDT
BTW, what's your plan w.r.t. the memory cache and multiprocess?
Sam Weinig
Comment 3
2010-11-05 04:03:17 PDT
(In reply to
comment #2
)
> BTW, what's your plan w.r.t. the memory cache and multiprocess?
The current model uses a single process for all windows/tabs, so this has not been a problem we have had to solve yet. It will be an interesting problem to try and solve when the time comes though.
Adam Roben (:aroben)
Comment 4
2010-11-05 08:30:21 PDT
Comment on
attachment 72426
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=72426&action=review
> WebKit2/WebProcess/WebProcess.h:106 > + void calculateCacheSizes(CacheModel cacheModel, uint64_t memorySize, uint64_t diskFreeSize,
Seems like this can be a static member function.
> WebKit2/WebProcess/mac/WebProcessMac.mm:67 > void WebProcess::platformSetCacheModel(CacheModel cacheModel) > { > + NSURLCache *nsurlCache = [NSURLCache sharedURLCache];
Why did you move this up to the top? Was it a bug that it was lower down before? You should explain this in your ChangeLog.
> WebKit2/WebProcess/mac/WebProcessMac.mm:94 > + [nsurlCache setDiskCapacity:std::max(urlCacheDiskCapacity, [nsurlCache diskCapacity])]; // Don't shrink a big disk cache, since that would cause churn.
Why is std:: needed here? Normally we use "using namespace std;" so you don't have to write that.
Sam Weinig
Comment 5
2010-11-09 11:29:10 PST
Landed in
r71658
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug