Closed
Bug 1466267
Opened 6 years ago
Closed 1 year ago
Recalculate frecency in chunks on idle
Categories
(Toolkit :: Places, task, P2)
Toolkit
Places
Tracking
()
RESOLVED
DUPLICATE
of bug 1806666
People
(Reporter: lina, Assigned: mak)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxsearch])
Currently, we either chunk and recalculate frecencies asynchronously at startup, after a migration (https://searchfox.org/mozilla-central/rev/38bcf897f1fa19c1eba441a611cf309482e0d6e5/toolkit/components/places/Database.cpp#2410), or after a sync (https://searchfox.org/mozilla-central/rev/38bcf897f1fa19c1eba441a611cf309482e0d6e5/toolkit/components/places/SyncedBookmarksMirror.jsm#623,4535,4538). This is expensive if we need to do it for many pages. In bug 1462046, comment 18, and bug 1463938, comment 1, Mak suggests a more general approach: > What I'm suggesting as a long term fix instead, is to add a frecency_recalc field to moz_places and just set it to true everywhere we must recalculate frecency, that would preserve the previous frecency value, that likely won't be so wrong, and then recalculate frecency in chunks using something like idleDispatch, still using WHERE NOT frecencyIsValid ORDER BY frecency DESC LIMIT N.
Assignee | ||
Comment 1•6 years ago
|
||
In general we have a frecency performance problem due to 2 facts: 1. every sigle change (history/bookmarks) changes frecency 2. frecency must be decayed daily. The only way to fix 2) would be a new algorithm, something that was suggested in bug 704025. But we could reduce the implications of 1) by just marking a frecency as "invalid" when any change happens, and then recalculating a chunk of frecency on idle (if necessary). Pretty much that approach could probably be applied to any frecency calculation need, and in the meanwhile the awesomebar could keep using the existing value, that even if it's not up-to-date, it's also not horrible. We can evaluate whether it's more efficient to add a bool field to moz_places, or a moz_invalid_frecencies table with just a place_id column.
Priority: -- → P2
Assignee | ||
Updated•6 years ago
|
Whiteboard: [fxsearch]
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Assignee | ||
Updated•5 years ago
|
Priority: P2 → P1
Assignee | ||
Updated•5 years ago
|
Priority: P1 → P2
Assignee | ||
Updated•5 years ago
|
Type: enhancement → task
Updated•2 years ago
|
Severity: normal → S3
Assignee | ||
Updated•1 year ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•