Confirmed users, Bureaucrats and Sysops emeriti
2,088
edits
No edit summary |
No edit summary |
||
| Line 19: | Line 19: | ||
3) Upon first run, I have to add the frecency column to the moz_places table, create an index for that column, and make sure that livemark items and "place:" urls get a frecency of 0, and it should not appear in the ac results. Another way for a place to have a 0 frecency is if the url only has "embedded" visits. | 3) Upon first run, I have to add the frecency column to the moz_places table, create an index for that column, and make sure that livemark items and "place:" urls get a frecency of 0, and it should not appear in the ac results. Another way for a place to have a 0 frecency is if the url only has "embedded" visits. | ||
5) If I don't know the | 5) If I don't know the frecency of a place, the value is -1. This is what I call an "invalid" frecency. If something has an invalid frecency, it will show up in the ac results. | ||
6) the url bar drop down shows "typed" sites, ordered by frecency descending. | 6) the url bar drop down shows "typed" sites, ordered by frecency descending. | ||
| Line 25: | Line 25: | ||
7) When inserting a bookmark, we attempt to calculate a frecency for it. This will impact the performance of bookmark import and also fx 2 - > fx 3 migration. (spin off bug coming about how to deal with it.) | 7) When inserting a bookmark, we attempt to calculate a frecency for it. This will impact the performance of bookmark import and also fx 2 - > fx 3 migration. (spin off bug coming about how to deal with it.) | ||
8) for how we calculate a | 8) for how we calculate a frecency for a site, see http://wiki.mozilla.org/User:Mconnor/PlacesFrecency (and option 3). I use the 10 most recent visits, and this is pref controlled, as all are the buckets, weights and bonus values. | ||
9) if we don't have any visits for a site, I make an attempt to estimate the frecency. more on this in a spin off bug (including when we should estimate and when we should not.) | 9) if we don't have any visits for a site, I make an attempt to estimate the frecency. more on this in a spin off bug (including when we should estimate and when we should not.) | ||
| Line 120: | Line 120: | ||
spin off bug: | spin off bug: | ||
upon moving a bookmark, update the frecency. for unvisited bookmarks, this bumps the frecency, because we use PR_Now() as the pseudo visit, which is desired, as we're expressing interest. For visited bookmarks, it may age the bookmark and lower frecency. Is that desired? for now, punt on this and for | upon moving a bookmark, update the frecency. for unvisited bookmarks, this bumps the frecency, because we use PR_Now() as the pseudo visit, which is desired, as we're expressing interest. For visited bookmarks, it may age the bookmark and lower frecency. Is that desired? for now, punt on this and for annotations for updating frecencies. | ||
5) | 5) | ||
issue: if when | issue: if when autocompleting, we will prefer moz_place title over bookmark title, and so when showing match, we will show that one. because of the fix for bug #407292 – When adding a bookmark with no title, we should use the uri as the title, you might get the uri as the title if it matches the user text, as we prefer it. | ||
6) | 6) | ||
| Line 165: | Line 165: | ||
10) | 10) | ||
when do we recalc frecencies for places I don't revisit? on expiration, but that could be a long time. we also recalc on idle (after first bucket days), ordered by high | when do we recalc frecencies for places I don't revisit? on expiration, but that could be a long time. we also recalc on idle (after first bucket days), ordered by high frecency. | ||
11) | 11) | ||
| Line 187: | Line 187: | ||
16) | 16) | ||
add code so that for all non place: and | add code so that for all non place: and unvisited children of livemarks we set frecency to 0, so that we can use it after migration, clear all private data, etc | ||
17) | 17) | ||
| Line 205: | Line 205: | ||
21) | 21) | ||
for the ac queries, sort by | for the ac queries, sort by frecency, then typed, then visit_count because we might not have frecency. in the case of 3b2 migration or clear all private data, lots of places have frecency = -1 (until idle), so we will have lots of frecency ties, so use typed and visit_count to break the ties and provide better results. | ||
22) | 22) | ||
| Line 294: | Line 294: | ||
32) | 32) | ||
we use last <n> visits. if all <n> are embed, but earlier visits were not, when we calculate | we use last <n> visits. if all <n> are embed, but earlier visits were not, when we calculate frecency, we could end up with zero, even though the n+1 visit is typed. is this a spin off bug (I think so). we could make sure that if a place as at least 1 non 0,4 visit, we give it a non-zero frecency, or some other idea to prevent this bug. | ||
32) add comment about why we can't trust visit_count (from older versions) (we counted embed!) | 32) add comment about why we can't trust visit_count (from older versions) (we counted embed!) | ||
| Line 323: | Line 323: | ||
zero visits, bookmarked, typed: type in http://www.google.com and then bookmark it. clear all history, giving it a frecency of -1. when we recalc on idle, we will give it a frecency of 340 (bookmark bonus + typed bonus, see the browser.frecency.unvisited* prefs). We have no visits, but since it is a bookmark, we want a non-zero frecency. | zero visits, bookmarked, typed: type in http://www.google.com and then bookmark it. clear all history, giving it a frecency of -1. when we recalc on idle, we will give it a frecency of 340 (bookmark bonus + typed bonus, see the browser.frecency.unvisited* prefs). We have no visits, but since it is a bookmark, we want a non-zero frecency. | ||
In irc where I wrote: " while working on the | In irc where I wrote: " while working on the answer to your question above, I noticed a small issue in that code, I'll answer it in a spin off bug as soon as I confirm the issue." This is what I was referring to. I think we should be returning 200 here, instead of 340. | ||
The change would be: | The change would be: | ||
| Line 342: | Line 342: | ||
// assuming mUnvisitedTypedBonus > mUnvisitedBookmarkBonus | // assuming mUnvisitedTypedBonus > mUnvisitedBookmarkBonus | ||
// this makes it so an | // this makes it so an unvisited, typed bookmark frecency > unvisited, untyped bookmark frecency | ||
if (aTyped) | if (aTyped) | ||
bonus = mUnvisitedTypedBonus | bonus = mUnvisitedTypedBonus | ||
| Line 352: | Line 352: | ||
zero visits, not bookmarked, typed: type in http://www.google.com, and annotate it but don't bookmark it. clear all private data, giving it a frecency of -1. on idle, we'd give this thing a value of 0 because visit count is 0. | zero visits, not bookmarked, typed: type in http://www.google.com, and annotate it but don't bookmark it. clear all private data, giving it a frecency of -1. on idle, we'd give this thing a value of 0 because visit count is 0. | ||
zero visits, not bookmarked, not typed: this will give us a | zero visits, not bookmarked, not typed: this will give us a frecency of 0, which is desired. | ||
| Line 384: | Line 384: | ||
x) | x) | ||
for calc | for calc frecency, never calc 0 unless place: or unvisited livemark item, so do 1. | ||
x) | x) | ||
| Line 400: | Line 400: | ||
x) | x) | ||
when calc | when calc frecency, never calc 0 unless place: or unvisit livemark item, so do 1. | ||
x) | x) | ||