Closed
Bug 503713
Opened 15 years ago
Closed 15 years ago
safe browsing requests shouldn't be placed in disk cache
Categories
(Toolkit :: Safe Browsing, defect)
Toolkit
Safe Browsing
Tracking
()
RESOLVED
FIXED
Firefox 3.7a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta5-fixed |
status1.9.1 | --- | wanted |
People
(Reporter: Dolske, Assigned: Unfocused)
Details
(Keywords: perf)
Attachments
(1 file)
2.13 KB,
patch
|
tony
:
review+
beltzner
:
approval1.9.2+
|
Details | Diff | Splinter Review |
Open up about:cache, and look through the disk cache entries. You'll see multiple entries from requests to the google safebrowsing server. I see entries like Key: http://safebrowsing-cache.google.com/safebrowsing/rd/goog-phish-shavar_a_####### and Key: id=4a57da87&uri=http://safebrowsing.clients.google.com/safebrowsing/downloads/...... AFAIK all this data just ends up in urlclassifier3.sqlite, so it's just wasting space sitting in the disk cache, and crowding out other things that could be using the cache. Biesi suggests that maybe it "should set the INHIBIT_CACHING flag".
Flags: wanted1.9.1.x?
Flags: blocking-firefox3.6?
Reporter | ||
Comment 1•15 years ago
|
||
I wonder if this also contributes to disk thrashing, since we're writing to two files (disk cache, SQL DB) for each entry.
Updated•15 years ago
|
status1.9.1:
--- → wanted
Flags: wanted1.9.1.x?
Comment 2•15 years ago
|
||
We're sure it doesn't use the cache version? If so, this sounds like a good idea. Our cache isn't known to be the fastest thing in the world, I wonder if this would give us a significant perf boost. If we can get an idea of perf gains, feel free to renominate.
Flags: wanted-firefox3.6+
Flags: blocking-firefox3.6?
Flags: blocking-firefox3.6-
Comment 3•15 years ago
|
||
If url-classifier were using cached http requests, how would it look them up in the cache? I just want to rule that out before looking into "INHIBIT_CACHING". I assume we are not using any cache data in safebrowsing.
Reporter | ||
Comment 4•15 years ago
|
||
It would be a little silly for it to go out of its way to use the HTTP cache, considering the data must be available in the on-disk SQL DB.
Assignee | ||
Comment 5•15 years ago
|
||
(In reply to comment #3) > If url-classifier were using cached http requests, how would it look them up in > the cache? I just want to rule that out before looking into "INHIBIT_CACHING". > I assume we are not using any cache data in safebrowsing. Had a look into this... from what I understand: * The stream updater will only ever send unique requests (each partial update is unique), so no chance of a cache hit. * The hash completer uses batch requests, which would (almost) always result in a cache miss. Also, I *think* it will only send requests with a partial hashes (to get the complete hash), then store the complete hash, so not have to request the same partial hash more than once.
Assignee: nobody → bmcbride
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•15 years ago
|
||
This patch adds INHIBIT_CACHING to the stream updater and the hash completer requests. I've also added LOAD_BYPASS_CACHE to avoid any cache lookup, since that will be guaranteed to always result in a miss anyway.
Attachment #405820 -
Flags: review?
Assignee | ||
Updated•15 years ago
|
Attachment #405820 -
Flags: review? → review?(dcamp)
Comment 7•15 years ago
|
||
Blair: I am not sure if dcamp is reading bugmail or reviewing safebrowsing bugs. Did you write a test case for this change?
Comment 8•15 years ago
|
||
He'll likely review if you email him personally, but Tony Chang also does reviews, I believe.
Assignee | ||
Comment 9•15 years ago
|
||
(In reply to comment #7) > Did you write a test case for this change? No, I didn't think it was necessary, since I'm only adding flags that don't actually affect how any of this code works. If tests are warranted, I'll need help from someone - I haven't the faintest idea on how to automatically test this. (In reply to comment #8) > but Tony Chang also does reviews, I believe. Ok.
Assignee | ||
Updated•15 years ago
|
Attachment #405820 -
Flags: review?(dcamp) → review?(tony)
Updated•15 years ago
|
Attachment #405820 -
Flags: review?(tony) → review+
Comment 10•15 years ago
|
||
Comment on attachment 405820 [details] [diff] [review] Patch v1 Looks good.
Assignee | ||
Updated•15 years ago
|
Keywords: checkin-needed
Comment 11•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/14f4a91d2ffa
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a1
Comment 12•15 years ago
|
||
Please be sure to nominate this for a+ assuming it passes all tests on mozilla-central
Assignee | ||
Updated•15 years ago
|
Attachment #405820 -
Flags: approval1.9.2?
Comment 13•15 years ago
|
||
Comment on attachment 405820 [details] [diff] [review] Patch v1 approval1.9.2 requests aren't currently being monitored, since we're nearing RC freeze and there are too many outstanding requests, so I'm clearing this request. Feel free to re-request approval if you are confident that it's worth drivers' time to consider whether this non-blocker needs to land for 1.9.2 at this stage.
Attachment #405820 -
Flags: approval1.9.2?
Assignee | ||
Comment 14•15 years ago
|
||
Ah snap - I thought this had landed on 1.9.2 already :( Anyway, doesn't look like this gave any significant pref boost on trunk after all.
Comment 15•15 years ago
|
||
Comment on attachment 405820 [details] [diff] [review] Patch v1 If it means less churning on the disk i/o side, I think it's worth it. You wouldn't believe the number of complaints I hear about safe browsing causing high disk i/o.
Attachment #405820 -
Flags: approval1.9.2?
Assignee | ||
Comment 16•15 years ago
|
||
(In reply to comment #15) > (From update of attachment 405820 [details] [diff] [review]) > If it means less churning on the disk i/o side, I think it's worth it. You > wouldn't believe the number of complaints I hear about safe browsing causing > high disk i/o. Fair enough - theoretically it should help there. Pity disk IO isn't measured & graphed (or is it?) so this could be quantified.
Comment 17•15 years ago
|
||
Comment on attachment 405820 [details] [diff] [review] Patch v1 a192=beltzner, seems very safe to me and less disk churn helps save battery, amongst other things
Attachment #405820 -
Flags: approval1.9.2? → approval1.9.2+
Comment 18•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/3585501111ca
status1.9.2:
--- → final-fixed
Updated•10 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•