Open
Bug 1110458
Opened 10 years ago
Updated 2 years ago
stress test and optimize Service Worker Cache schema
Categories
(Core :: Storage: Cache API, task)
Core
Storage: Cache API
Tracking
()
NEW
People
(Reporter: bkelly, Unassigned)
References
()
Details
To date the SW Cache implementation has only had very basic testing done. At most a handful of requests at a time. Before releasing this on the world we should verify it doesn't fall over on more realistic workloads.
I expect most of the issues will be in the DB schema. I have some ideas to improve things there, but want measurements to verify they are worth it:
Ideas:
* De-normalize VARY header info into a boolean column on each Cache entry. This avoids having to touch the headers table to determine if an entry needs the more complex VARY matching logic.
* Modify queries that read entries to use bulk operations. This would minimize index lookups. These are fast, but still take O(log n) time each.
Reporter | ||
Comment 1•10 years ago
|
||
See bug 940237 comment 110 for many excellent suggestions to investigate.
Comment 2•10 years ago
|
||
(ni'ing myself to continue my investigation I started on bug 940273)
Note that comment 1 has a bug number typo, :mak's feedback is on bug 940273 comment 110.
Flags: needinfo?(bugmail)
Reporter | ||
Comment 3•10 years ago
|
||
We should do this after the prefixMatch feature is removed in bug 1130452. This will make it much easier to use hashes for the URL and avoid TEXT column indices.
Depends on: 1130452
Reporter | ||
Comment 4•10 years ago
|
||
Note that performance testing and optimization here will include FileUtils code as well.
Reporter | ||
Comment 5•10 years ago
|
||
We should steal ideas from the IDB optimization bug.
Reporter | ||
Comment 6•10 years ago
|
||
Test measurements of different improvements in IDB:
https://docs.google.com/a/mozilla.com/spreadsheets/d/1KbcxgvkCeeuFArrnyA6qrvcuA_HWjWT-X5rn_nNJbIk/edit#gid=1280969721
Reporter | ||
Comment 7•10 years ago
|
||
I converted CacheStorage keys to blobs to fix a functional issue in bug 1153245. We should consider doing the same for other strings since we don't actually need fancy string encoding.
FYI, OpenDatabaseWithFileURL() need not always created shared cache connections; you can pass the "cache=private" option to get an unshared connection. (e.g. http://mxr.mozilla.org/mozilla-central/source/dom/indexedDB/ActorsParent.cpp#3556)
Reporter | ||
Updated•9 years ago
|
Assignee: nobody → bkelly
Status: NEW → ASSIGNED
Reporter | ||
Updated•9 years ago
|
Reporter | ||
Comment 9•9 years ago
|
||
I'm not working on this at the moment. We could do some more profiling, but this has been shipped for a while without any perf issues reported.
Assignee: bkelly → nobody
Status: ASSIGNED → NEW
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•5 years ago
|
Component: DOM: Core & HTML → Storage: Cache API
Updated•5 years ago
|
Type: defect → task
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•