Closed
Bug 476298
Opened 16 years ago
Closed 16 years ago
Switch RecalculateFrecencies to just fix invalid frecencies
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: Mardak, Assigned: Mardak)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [fixes bug 476300, bug 482351])
Attachments
(1 file)
13.30 KB,
patch
|
dietrich
:
review+
|
Details | Diff | Splinter Review |
This is part 2 of 3 to address bug 458801.
Instead of recalculating old and invalid frecencies, we can just focus on the invalid ones to make them valid and estimate a frecency for the old ones.
Assignee | ||
Comment 1•16 years ago
|
||
Get rid of the prefs and RecalcFrecencies* functions.
About the comments for "maybe run on idle to do some work".. We actually do run FixInvalidFrecencies() down the way when we migrate/upgrade anyway.
I figured the query for finding invalid didn't need to be cached in the class. It'll be used once a day.. when the user is idle anyway.
Delete delete delete!
Some questions/bugs?
XXX does frecency need to be -visit_count anymore?
XXX pages with invalid frecencies tend to be those that have more than 2 redirects in a row; mDBVisitsForFrecency tries to find parent of redirect, but probably should have a helper function that finds the right source
Comment 2•16 years ago
|
||
(In reply to comment #1)
> Created an attachment (id=359943) [details]
> v1
>
> Get rid of the prefs and RecalcFrecencies* functions.
>
> About the comments for "maybe run on idle to do some work".. We actually do run
> FixInvalidFrecencies() down the way when we migrate/upgrade anyway.
>
> I figured the query for finding invalid didn't need to be cached in the class.
> It'll be used once a day.. when the user is idle anyway.
>
> Delete delete delete!
>
> Some questions/bugs?
>
> XXX does frecency need to be -visit_count anymore?
no, not since we're updating them all in one shot.
> XXX pages with invalid frecencies tend to be those that have more than 2
> redirects in a row; mDBVisitsForFrecency tries to find parent of redirect, but
> probably should have a helper function that finds the right source
sure, file a followup.
Comment 3•16 years ago
|
||
Comment on attachment 359943 [details] [diff] [review]
v1
r=me, on the code change, still needs a test though.
Attachment #359943 -
Flags: review?(dietrich) → review+
Assignee | ||
Comment 4•16 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/0bf1c26438e1
Create a new method FixInvalidFrecencies that finds invalid (negative) frecencies and recalculates them. Use it for handling creating/migrating DBs as well as recalculating invalid places on daily idle (place frecencies are already estimated by decay). This obviates a few preferences, queries and methods related to recalculating on idle. The test uses mork history with a number of pages that now all get their frecencies calculated on migrate, where before this fix, the test fails with a bunch of pages still with negative frecencies.
Blocks: 482351
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Flags: in-litmus-
Resolution: --- → FIXED
Whiteboard: [fixes bug 476300, bug 482351]
Target Milestone: --- → mozilla1.9.2a1
You need to log in
before you can comment on or make changes to this bug.
Description
•