Open
Bug 1367216
Opened 8 years ago
Updated 2 years ago
Refactor Cache API mozilla::dom::cache::Connection class (dom/cache/Connection.cpp) so consumers can instead use mozStorage connections and its built-in incremental vacuum support
Categories
(Core :: Storage: Cache API, enhancement, P3)
Core
Storage: Cache API
Tracking
()
NEW
People
(Reporter: asuth, Unassigned)
References
Details
Bug 1217544 is extracting some mozStorage-related functionality out of dom/cache so dom/backgroundsync could use it. (Namely mozStorageConnectionUtils.{h,cpp} and IncrementalVacuumConnect.{h,cpp}. Discussion starts at https://bugzilla.mozilla.org/show_bug.cgi?id=1217544#c129.) One conclusion was that IncrementalVacuumConnection (which exists only to provide automatic incremental vacuuming on close) really doesn't need to exist as a decorator and its logic can be integrated into our mozIStorageConnection implementation directly.
Care should be taken to emphasize in comments and documentation that incremental vacuum is about minimizing disk usage of a file, not about reducing on-disk fragmentation or btree fragmentation. (mozStorageConnectionUtils' IncrementalVacuum method has some good comments to this effect about how aMaxFreePages is used to create hysteresis so that we avoid creating pathological on-disk fragmentation.)
Updated•8 years ago
|
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
Comment 1•2 years ago
|
||
Bug 1813986 has added a RemovablePagesInFreeList() method and some vacuum code that could be reused.
Reporter | ||
Comment 2•2 years ago
|
||
We ended up abandoning the implementation referenced in comment 0, but the DOM Cache API Connection class continues to exist only for incremental-vacuum-on-close, and could benefit from the great changes in bug 1813986, so I've amended the subject and component of this bug. Thank you!
Component: Storage → Storage: Cache API
Product: Toolkit → Core
Summary: Refactor IncrementalVacuumConnection's incremental-vacuum-on-close behavior into mozIStorageConnection → Refactor Cache API mozilla::dom::cache::Connection class (dom/cache/Connection.cpp) so consumers can instead use mozStorage connections and its built-in incremental vacuum support
You need to log in
before you can comment on or make changes to this bug.
Description
•