Necko/Cache/Plans: Difference between revisions

From MozillaWiki
< Necko‎ | Cache
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
= Type 1: Locking / Initialization Performance / Asynchronicity =
= New Cache Plans =


These are run-time items, things that don't involve changing anything about the cache on-disk.
== People ==


== Open ==
We have decided to rewrite the HTTP disk cache.


* {{nbug|717761}} - Main thread can be blocked by IO on the cache thread
Design team:
* {{nbug|701909}} - Disk cache seems to cause exceptionally slow startups(1min+)
* ?
* {{nbug|723362}} - Make nsCacheEntryDescriptor::Doom asynchronous
* {{nbug|695399}} - Remove synchronous cache API (nsICacheSession::openCacheEntry)
** Alternatively leave them but entirely disabled on the main thread.
* {{nbug|761736}} - CACHE_SERVICE_LOCK_MAINTHREAD possibly regressed
* {{nbug|744388}}, {{nbug|762094}} - New tab page shouldn't use synchronous cache APIs.
* {{nbug|763555}} - Do not do I/O while holding the cache lock


== Closed ==
Implementation team:
* ?


* {{nbug|716293}} - IO on the main thread caused by nsDiskCacheOutputStream::Close()
== Design Requirements ==
* {{nbug|722034}} - Cache entry check--CheckCache()--is done on the main thread, causing the main thread to wait on the cache service lock, which may be blocked on disk I/O
* {{nbug|722033}} - Remove calls to synchronous openCacheEntry in nsHttpChannel


= Type 2: Deleting / Moving / Sizing Entire Cache =
* All APIs should be async.
* A crash should not invalidate the entire cache.


These items involve our ability to delete and move the disk cache as a whole, treating it as "black box."
== Performance Goals ==


== Open ==
* Primary performance target is mobile - Android and Firefox OS. On-disk layout must optimize for this.
* Make sure performance on spinning disks is good, but top performance here is not the priority.


* {{nbug|745340}} - Improve disk cache smart sizing for mobile
== API ==
* Allow cache to be deleted out from under us so that we can put cache in designated purge-able cache directories.
* Make sure we are deleting unwanted caches as efficiently and with as little disruption as possible.
** {{nbug|754575}} - Cache.Trash* files fill up disk space


== Closed ==
API design goes here.


= Type 3: On-Disk Layout Changes =
== Locking Designs ==


These items involve changing the on-disk layout for the cache, changing things inside the "black box."
Locking plans go here. Clearly detail what locks the cache will have, and strategies to avoid lock contention in performance-critical situations.


== Open ==
== On-Disk Layout ==


* {{nbug|105843}} - Cache lost if Mozilla crashes
Clearly describe on-disk layout here.
* {{nbug|715714}} - Adapt cache based on io rates
* {{nbug|715752}} - Add version numbers to cache
* Disk layout optimizations for different device types (SSD vs. HDD)
* {{nbug|593198}} - Use CACHE__00X files for larger sizes to lower total # of cache files
 
== Closed ==
 
= Prioritization =
 
Only bug numbers go in this list. If it doesn't have a bug it can't be a priority. Any bugs in this list should also be in an above bucket with a description.
 
# {{nbug|717761}}
# {{nbug|105843}}

Revision as of 15:50, 11 March 2013

New Cache Plans

People

We have decided to rewrite the HTTP disk cache.

Design team:

  • ?

Implementation team:

  • ?

Design Requirements

  • All APIs should be async.
  • A crash should not invalidate the entire cache.

Performance Goals

  • Primary performance target is mobile - Android and Firefox OS. On-disk layout must optimize for this.
  • Make sure performance on spinning disks is good, but top performance here is not the priority.

API

API design goes here.

Locking Designs

Locking plans go here. Clearly detail what locks the cache will have, and strategies to avoid lock contention in performance-critical situations.

On-Disk Layout

Clearly describe on-disk layout here.