Project: skia Issues People Development process History Sign in
New issue
Advanced search Search tips
Starred by 5 users
Status: Accepted
Owner:
Cc:
Area: ----
Priority: Medium
Type: Idea



Sign in to add a comment
Std way to decide when a given item is too small or too cheap to cache
Project Member Reported by reed@google.com, Oct 23 2014 Back to list
SkResourceCache is our general cache, but very small items, or very cheap-to-compute items probably are a net loss if we use the cache on them.

e.g. very small (and therefore fast) blurs.

Some thoughts for deciding how/where to "not" cache things:
- each caller can decide
- perhaps we centralize it per cache specialty [e.g. bitmapcache, maskcache]
- the cache itself might assist [e.g. compare size to budget, compare size to discardablememory overhead]
- others?

 
Project Member Comment 1 by hcm@google.com, Nov 25 2014
Labels: -Type-Defect Type-Idea
Project Member Comment 2 by hcm@google.com, Dec 7 2015
Labels: Hotlist-Fixit
Project Member Comment 3 by caryclark@google.com, Jan 5 2016
Cc: reed@google.com
Owner: caryclark@google.com
Any thoughts on how to go about determining which small items are worth the work to optimize in this way? I'm happy to work on this, but need some direction.
Project Member Comment 4 by mtkl...@google.com, Jan 5 2016
Measure the time spent to create them?
Sign in to add a comment