WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
122954
Try to keep AppCache memory caches in control
https://bugs.webkit.org/show_bug.cgi?id=122954
Summary
Try to keep AppCache memory caches in control
Xabier Rodríguez Calvar
Reported
2013-10-17 04:51:51 PDT
[AppCache] Trying to keep memory caches in control
Attachments
Patch
(14.49 KB, patch)
2013-10-17 04:53 PDT
,
Xabier Rodríguez Calvar
no flags
Details
Formatted Diff
Diff
Patch
(14.53 KB, patch)
2013-10-17 07:26 PDT
,
Xabier Rodríguez Calvar
no flags
Details
Formatted Diff
Diff
Patch
(16.11 KB, patch)
2013-10-31 05:14 PDT
,
Xabier Rodríguez Calvar
no flags
Details
Formatted Diff
Diff
Patch
(16.81 KB, patch)
2013-11-08 10:58 PST
,
Xabier Rodríguez Calvar
beidson
: review-
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Xabier Rodríguez Calvar
Comment 1
2013-10-17 04:53:06 PDT
Created
attachment 214441
[details]
Patch Attempt to keep the memory cache under control. This is a proof of concept and suggestions are very welcome. Changelog will be added when patch is ready.
Build Bot
Comment 2
2013-10-17 05:21:13 PDT
Comment on
attachment 214441
[details]
Patch
Attachment 214441
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/3474135
Build Bot
Comment 3
2013-10-17 05:39:46 PDT
Comment on
attachment 214441
[details]
Patch
Attachment 214441
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/3480051
Xabier Rodríguez Calvar
Comment 4
2013-10-17 07:26:19 PDT
Created
attachment 214454
[details]
Patch AtFixed compile issue
Alexey Proskuryakov
Comment 5
2013-10-17 09:38:06 PDT
Could you please explain your approach? It's hard to see how code proves a concept when the concept is kept secret :)
Xabier Rodríguez Calvar
Comment 6
2013-10-17 09:52:07 PDT
(In reply to
comment #5
)
> Could you please explain your approach? It's hard to see how code proves a concept when the concept is kept secret :)
Sure , sorry for that :) The idea is having an upper limit for the memory used by the app cache in case we have several caches in memory and as they are in the database anyway we can reload the resource from disk to memory easily when needed. What the patch does is setting some control points, specially when a cache is loaded or stuff is added to it. Then it checks the size of the caches in memory and if it's above the limit, at a first step it tries to dump all caches but the last one and if that doesn't reach the limit, it waits for some time and then it dumps everything.
Alexey Proskuryakov
Comment 7
2013-10-21 09:54:38 PDT
Yes, this is certainly a huge inefficiencies in the current appcache implementation. I don't think that hardcoding a limit is a great answer though. Keeping even a single application in memory doesn't make sense when it's large. We need something much more like a regular resource cache, just backed by appcache database and not the network. That would respect system low memory notifications too.
Xabier Rodríguez Calvar
Comment 8
2013-10-28 10:57:09 PDT
(In reply to
comment #7
)
> Yes, this is certainly a huge inefficiencies in the current appcache implementation. > > I don't think that hardcoding a limit is a great answer though. Keeping even a single application in memory doesn't make sense when it's large. > > We need something much more like a regular resource cache, just backed by appcache database and not the network. That would respect system low memory notifications too.
With the approach I am trying, no app is stored in memory after certain amount of time, because it is evicted by the timer.
Xabier Rodríguez Calvar
Comment 9
2013-10-28 10:58:33 PDT
(In reply to
comment #8
)
> (In reply to
comment #7
) > > Yes, this is certainly a huge inefficiencies in the current appcache implementation. > > > > I don't think that hardcoding a limit is a great answer though. Keeping even a single application in memory doesn't make sense when it's large. > > > > We need something much more like a regular resource cache, just backed by appcache database and not the network. That would respect system low memory notifications too. > > With the approach I am trying, no app is stored in memory after certain amount of time, because it is evicted by the timer.
With this I mean if there is any way that we can work out this patch and get it applied, knowing that we need to fix it better, of course, but as an improvement instead of a permanent solution?
Xabier Rodríguez Calvar
Comment 10
2013-10-31 05:14:13 PDT
Created
attachment 215643
[details]
Patch Done some improvements for the moment the cache is created and added cache eviction for background.
Build Bot
Comment 11
2013-11-04 03:01:17 PST
Comment on
attachment 215643
[details]
Patch
Attachment 215643
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/19598732
Build Bot
Comment 12
2013-11-04 03:44:24 PST
Comment on
attachment 215643
[details]
Patch
Attachment 215643
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/19598747
Build Bot
Comment 13
2013-11-04 03:54:02 PST
Comment on
attachment 215643
[details]
Patch
Attachment 215643
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/19628700
Xabier Rodríguez Calvar
Comment 14
2013-11-08 10:58:32 PST
Created
attachment 216412
[details]
Patch Fixed Mac build.
Xabier Rodríguez Calvar
Comment 15
2013-11-14 08:17:06 PST
(In reply to
comment #7
)
> I don't think that hardcoding a limit is a great answer though. Keeping even a single application in memory doesn't make sense when it's large.
It takes into account the cache only for the first pass, after the timeout that cache should be purged too.
> We need something much more like a regular resource cache, just backed by appcache database and not the network. That would respect system low memory notifications too.
Is there any way we could get landed even it is not the perfect solution? I think it is better than nothing.
Brady Eidson
Comment 16
2016-05-24 22:05:06 PDT
Comment on
attachment 216412
[details]
Patch Assuming that patches for review since 2013 are stale, r-
Anne van Kesteren
Comment 17
2022-10-27 08:53:03 PDT
AppCache is now disabled and will be removed in
bug 219391
.
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