Closed
Bug 349809
Opened 18 years ago
Closed 18 years ago
add random intervals to update requests
Categories
(Toolkit :: Safe Browsing, defect)
Toolkit
Safe Browsing
Tracking
()
RESOLVED
FIXED
Firefox 2
People
(Reporter: tony, Assigned: tony)
References
Details
(Keywords: fixed1.8.1)
Attachments
(1 file, 2 obsolete files)
|
4.03 KB,
patch
|
darin.moz
:
superreview+
beltzner
:
approval1.8.1+
|
Details | Diff | Splinter Review |
(another requirement from launch engineering) If anti-phishing is on, we make an update request for local lists when Firefox starts up and then once every hour. Rather than having a rigid time, we should add a small random interval (e.g., 60 min + (rand() * 5 min)). This avoids the case of everyone hitting the server at exactly the same time.
| Assignee | ||
Updated•18 years ago
|
Flags: blocking-firefox2?
Comment 1•18 years ago
|
||
I don't know if this proposal actually solves that problem, but sure, we'll take a small timer fix here :)
Flags: blocking-firefox2? → blocking-firefox2+
Target Milestone: --- → Firefox 2
Comment 2•18 years ago
|
||
Instead of adding up to five minutes of randomness, it seems like it'd sense to pick a random number between 0 and 59 each time a user starts up and then start updating on that minute every hour. Then we'll be distributing loads evenly across the minutes in the hour, regardless of the distribution of starts across them. So, after checking for the first time on startup, check for the second time in 30 + (rand() * 59) minutes, which distributes the second check between 30 and 89 minutes (an average of one hour) away. Then commence checking every 60 minutes.
Flags: blocking-firefox2+ → blocking-firefox2?
Target Milestone: Firefox 2 → ---
| Assignee | ||
Comment 3•18 years ago
|
||
(In reply to comment #2) > Instead of adding up to five minutes of randomness, it seems like it'd sense to > pick a random number between 0 and 59 each time a user starts up and then start > updating on that minute every hour. Then we'll be distributing loads evenly > across the minutes in the hour, regardless of the distribution of starts across > them. > > So, after checking for the first time on startup, check for the second time in > 30 + (rand() * 59) minutes, which distributes the second check between 30 and > 89 minutes (an average of one hour) away. Then commence checking every 60 > minutes. This sounds better and shouldn't be riskier to implement. I'll go with this.
| Assignee | ||
Comment 4•18 years ago
|
||
Err, the blocking flag accidentally got toggled off.
Updated•18 years ago
|
Flags: blocking-firefox2? → blocking-firefox2+
Target Milestone: --- → Firefox 2
| Assignee | ||
Comment 5•18 years ago
|
||
- going with myk's suggestion
Attachment #235270 -
Flags: review?(provos)
Comment 6•18 years ago
|
||
Comment on attachment 235270 [details] [diff] [review] v1: add random interval to table update requests I am a little bit confused about the use of repeating alarms here. at the moment, initialUpdateCheck is called for each update and it installs a repeating alarm. wouldn't it be cleaner to make that a non repeating alarm or call initialUpdateCheck only once and then go back to the CheckForUpdates function?
| Assignee | ||
Comment 7•18 years ago
|
||
(In reply to comment #6) > (From update of attachment 235270 [details] [diff] [review] [edit]) > I am a little bit confused about the use of repeating alarms here. at the > moment, initialUpdateCheck is called for each update and it installs a > repeating alarm. wouldn't it be cleaner to make that a non repeating alarm or > call initialUpdateCheck only once and then go back to the CheckForUpdates > function? It does your second suggestion of calling initialUpdateCheck only once then going back to checkForUpdates. Perhaps the comments are confusing?
Comment 8•18 years ago
|
||
Comment on attachment 235270 [details] [diff] [review] v1: add random interval to table update requests looks fine. i must have misread earlier.
Attachment #235270 -
Flags: review?(provos) → review+
| Assignee | ||
Updated•18 years ago
|
Attachment #235270 -
Flags: superreview?(darin)
| Assignee | ||
Comment 9•18 years ago
|
||
Offline, Niels said it should be 30 minutes. Same as before except first scheduled check is between 15-45 min, then every 30 min after that.
Attachment #235270 -
Attachment is obsolete: true
Attachment #235464 -
Flags: review?(provos)
Attachment #235270 -
Flags: superreview?(darin)
| Assignee | ||
Updated•18 years ago
|
Attachment #235464 -
Attachment description: v2: switch to 30 minu update interval → v2: switch to 30 min update interval
Comment 10•18 years ago
|
||
Comment on attachment 235464 [details] [diff] [review] v2: switch to 30 min update interval you need to adjust some of the comments that talk about 60 minute intervals.
Attachment #235464 -
Flags: review?(provos) → review+
| Assignee | ||
Comment 11•18 years ago
|
||
Attachment #235464 -
Attachment is obsolete: true
Attachment #235475 -
Flags: superreview?(darin)
Updated•18 years ago
|
Attachment #235475 -
Flags: superreview?(darin) → superreview+
| Assignee | ||
Comment 12•18 years ago
|
||
on trunk
| Assignee | ||
Updated•18 years ago
|
Attachment #235475 -
Flags: approval1.8.1?
Comment 13•18 years ago
|
||
Comment on attachment 235475 [details] [diff] [review] v3: fix comments a=beltzner on behalf of 181drivers
Attachment #235475 -
Flags: approval1.8.1? → approval1.8.1+
| Assignee | ||
Comment 14•18 years ago
|
||
on branch
Updated•10 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•