Changes

Jump to: navigation, search

User:Sspitzer/GlobalFrecency

5 bytes added, 07:27, 14 January 2008
no edit summary
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 frececny 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.
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 freceny 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.)
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 annoations annotations for updating frecencies.
5)
issue: if when autocompleteingautocompleting, 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)
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 frececenyfrecency.
11)
16)
add code so that for all non place: and unvisisted unvisited children of livemarks we set frecency to 0, so that we can use it after migration, clear all private data, etc
17)
21)
for the ac queries, sort by frecenyfrecency, 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)
32)
we use last <n> visits. if all <n> are embed, but earlier visits were not, when we calculate frecnecyfrecency, 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!)
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 asnwer 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:
// assuming mUnvisitedTypedBonus > mUnvisitedBookmarkBonus
// this makes it so an unvistedunvisited, typed bookmark frecency > unvisited, untyped bookmark frecency
if (aTyped)
bonus = mUnvisitedTypedBonus
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 frececny frecency of 0, which is desired.
x)
for calc frecncyfrecency, never calc 0 unless place: or unvisit unvisited livemark item, so do 1.
x)
x)
when calc frecncyfrecency, never calc 0 unless place: or unvisit livemark item, so do 1.
x)
Confirm, emeritus
2,088
edits

Navigation menu