Closed
Bug 1377559
Opened 7 years ago
Closed 7 years ago
Should store value of preference browser.safebrowsing.debug to reuse
Categories
(Toolkit :: Safe Browsing, enhancement, P2)
Toolkit
Safe Browsing
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: tnguyen, Assigned: tnguyen)
References
Details
(Whiteboard: #sbv4-m8)
Attachments
(1 file, 1 obsolete file)
I see in url-classifier code that preference browser.safebrowsing.debug (in log(...))is read a lot of time, should cache it somewhere, listen to value change, and reuse
Assignee | ||
Updated•7 years ago
|
Priority: -- → P2
Assignee | ||
Comment 1•7 years ago
|
||
MozReview-Commit-ID: 1yWe7wB0ARl
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → tnguyen
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•7 years ago
|
||
Wip patch, I would like to wait for landing bug 1297614 first
No longer blocks: 1376591
Assignee | ||
Updated•7 years ago
|
Whiteboard: #sbv4-m8
Assignee | ||
Comment 3•7 years ago
|
||
I would like to do in this bug because, in some profiles, reading pref may take time https://perf-html.io/public/cfe5c76c2f54845efece5f125c6c841c034e3a9c/calltree/?callTreeFilters=prefixjs-DUdDUiDXjDXk&hiddenThreads=&implementation=js&range=2.4996_2.6945&thread=0&threadOrder=0-2-3-1
Assignee | ||
Updated•7 years ago
|
Summary: Should cache preference browser.safebrowsing.debug → Should store value of preference browser.safebrowsing.debug to reuse
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8883240 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8884143 -
Flags: review?(francois)
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8884143 [details] Bug 1377559 - Should store value of preference browser.safebrowsing.debug to reuse https://reviewboard.mozilla.org/r/155054/#review160370 ::: toolkit/components/url-classifier/SafeBrowsing.jsm:13 (Diff revision 1) > const Ci = Components.interfaces; > const Cu = Components.utils; > > Cu.import("resource://gre/modules/Services.jsm"); > > +let loggingEnabled = false; Let's add a constant here, just like in listmanager.js ::: toolkit/components/url-classifier/content/listmanager.js:23 (Diff revision 1) > // Lower and upper limits on the server-provided polling frequency > const minDelayMs = 5 * 60 * 1000; > const maxDelayMs = 24 * 60 * 60 * 1000; > const defaultUpdateIntervalMs = 30 * 60 * 1000; > > +const PREF_LOGGING_ENABLED = "browser.safebrowsing.debug"; The `loggingEnabled` variable makes sense to me, but I think the constant should be `PREF_DEBUG_ENABLED` to avoid confusion. ::: toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js:18 (Diff revision 1) > const COMPLETE_LENGTH = 32; > const PARTIAL_LENGTH = 4; > > // Upper limit on the server response minimumWaitDuration > const MIN_WAIT_DURATION_MAX_VALUE = 24 * 60 * 60 * 1000; > +const PREF_LOGGING_ENABLED = "browser.safebrowsing.debug"; `PREF_DEBUG_ENABLED`
Attachment #8884143 -
Flags: review?(francois) → review-
Assignee | ||
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8884143 [details] Bug 1377559 - Should store value of preference browser.safebrowsing.debug to reuse https://reviewboard.mozilla.org/r/155054/#review160606 Thanks you for your review
Comment hidden (mozreview-request) |
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8884143 [details] Bug 1377559 - Should store value of preference browser.safebrowsing.debug to reuse https://reviewboard.mozilla.org/r/155054/#review160812 ::: toolkit/components/url-classifier/SafeBrowsing.jsm:196 (Diff revision 2) > // skip nextupdatetime and lastupdatetime > if (aData.indexOf("lastupdatetime") >= 0 || aData.indexOf("nextupdatetime") >= 0) { > return; > } > + > + if (aData == PREF_DEBUG_ENABLED") { This stray `"` is causing a syntax error.
Attachment #8884143 -
Flags: review?(francois) → review-
Comment hidden (mozreview-request) |
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8884143 [details] Bug 1377559 - Should store value of preference browser.safebrowsing.debug to reuse https://reviewboard.mozilla.org/r/155054/#review161366
Attachment #8884143 -
Flags: review?(francois) → review+
Assignee | ||
Comment 11•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=010554bd58cdd211d1e7a1a122bdee337225ee0d
Keywords: checkin-needed
Comment 12•7 years ago
|
||
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f95be8a71102 Should store value of preference browser.safebrowsing.debug to reuse r=francois
Keywords: checkin-needed
Comment 13•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f95be8a71102
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•