WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
208468
Clear CGColor cache on memory pressure
https://bugs.webkit.org/show_bug.cgi?id=208468
Summary
Clear CGColor cache on memory pressure
Chris Dumez
Reported
2020-03-02 13:39:10 PST
Clear CGColor cache on memory pressure.
Attachments
Patch
(4.24 KB, patch)
2020-03-02 13:40 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2020-03-02 13:40:43 PST
Created
attachment 392182
[details]
Patch
Simon Fraser (smfr)
Comment 2
2020-03-02 13:45:48 PST
How much of it do we just fill up again when we paint? I think this blanket "clear cache on memory pressure" will often just dirty more pages than we save.
Chris Dumez
Comment 3
2020-03-02 15:59:22 PST
Comment on
attachment 392182
[details]
Patch Will gather some data as this appears to be controversial.
Darin Adler
Comment 4
2020-03-23 16:11:39 PDT
Comment on
attachment 392182
[details]
Patch There’s an NSColor one just like this. Should we be clearing it too?
Darin Adler
Comment 5
2020-03-23 16:12:02 PDT
If we decide to clear either.
Simon Fraser (smfr)
Comment 6
2020-03-23 16:22:08 PDT
I just found SubimageCacheWithTimer, which isn't cleared at all on a memory warning (
bug 207957
). I still think our cache management needs to be more centralized.
Darin Adler
Comment 7
2020-03-23 16:22:52 PDT
(In reply to Simon Fraser (smfr) from
comment #6
)
> I still think our cache management needs to be more centralized.
Sounds good! But what does it mean?
Simon Fraser (smfr)
Comment 8
2020-03-23 16:31:04 PDT
Off the cuff: * every cache derives from a common base class, registers itself with a cache controller. This would make it harder for people to forget to handle new caches on memory pressure. * cache controller decides how to reduce in size or clear caches based on memory pressure. Maybe caches have some knobs that describe their time/memory trade-offs More general goals: * if clearing caches involves mapping in more memory pages than would be saved, then don't do it (probably requires empirical measurement) * rewrite caches to make it easier to dump memory pages without touching them
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