Firefox/Projects/Places Expiration Performance Refactoring
Sprint lead: sdwilsh
Sprinters: marco, dietrich
- Reduce code complexity and increase performance by reducing writes we do shortly after visiting a page.
Goals / Use Cases
- Continue to reduce the number of writes and fsyncs that we perform
- Move resource intensive activity off of the UI thread for improved snappiness
- Simplify expiration code
- Completely change our expiration algorithm (only looking for a small improvement)
Current theory is to expire whenever we do a timed flush in nsPlacesDBFlush.js. The idea is to expire some entries first, before we flush the temporary tables to disk, so we can free up disk space that can be reclaimed by the flush.
In order to notify observers properly, we'll first run a select query (asynchronously) to obtain the uri and visit time. We then expire those visits (and only the visits), and perform the normal flush queries.
In order to notify observers, we'll be creating a special object to pass to nsINavHistory::runBatched that contains the information we care about for notifications.