Open
Bug 585752
Opened 15 years ago
Updated 3 years ago
Instrument Disk Cache to Notify Observers of Evictions
Categories
(Core :: Networking: Cache, defect, P5)
Tracking
()
NEW
People
(Reporter: byronm, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-would-take])
Attachments
(1 file)
|
10.35 KB,
patch
|
Details | Diff | Splinter Review |
There are numerous reasons that an eviction can occur in our disk cache: due to a key collision, because an entry is greater than half the size of the cache, because an entry is greater than the maximum allowed entry size, because we are inserting an entry and the cache is just plain full...
This patch provides notifications whenever an eviction occurs in the disk cache. Such notifications are useful in analyzing the behavior of the cache and in order to make improvements.
A few notes on the implementation: The cache code does not run on the main thread, so notifications must be dispatched to the main thread as nsIRunnables. Because notifications occur after the actual reported events, we cannot trust that the entry the notification corresponds to is still in the cache. Therefor, notifications cannot provide pointers to actual cached data.
Currently, I just notify on a topic and provide the key of the entry as extra data. I'll update this patch shortly to include some stats about the entry being reported on as well.
| Reporter | ||
Comment 1•15 years ago
|
||
Updated•15 years ago
|
Blocks: http_cache
Updated•9 years ago
|
Whiteboard: [necko-would-take]
Comment 2•8 years ago
|
||
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•