Changes

Jump to: navigation, search

User:Sspitzer/GlobalFrecency

2,634 bytes added, 06:07, 28 December 2007
no edit summary
'''notes:'''
1)
on calculating frecency, if we don't know ahead of time, we need to check that for a place id, if it is bookmarked, but not a livemark. see CalculateFrecency() [not CalculateFrecencyInternal()]
 
'''todo'''
 
x)
 
// xxx unhide childId
printf("XXX todo unhide childId\n");
}
 
x)
 
when updating things with frecency of -1, need to verify they are not livemark items
 
x)
 
do we care about hidden, or should we just limit to frecency > 0?
 
x)
 
MigrateV7Up() may need to call "rv =
prefs->SetIntPref(PREF_BROWSER_LEFTPANEFOLDERID, -1);"
 
x)
 
But to solve the ebay problem, we should also recalc the moz_places with high
frecency and "old" last visit date. (In another patch, marco has added last
visit date to moz_places, which will make the query we need more efficient as
we don't have to join against moz_historyvisits)
 
If something has a recent last visit date, then we recently recalculated
frecency, so the frecency would be accurate.
If something has a low frecency and an old last visit date, recalculating would
only lower the frecency (and low frecency wouldn't be hurting our autocomplete
results.)
 
But if something has a high frecency and an old last visit date, recalculating
the frecency would lower the frecency, which would solve the ebay problem.
 
x)
 
// when we created the moz_place entry for the new bookmarks, hidden was 1,
// so frecency was 0. now update the frecency for this item
// XXX unless this is a livemark?
printf("XXX %lld UpdateFrecencyAndHiddenForBookmark\n", childID);
 
 
a) TRANSITION_BOOKMARK
b) prefs to make the pig tunable
d) what weight should transistion download have?
 
x)
 
optimization, if not bookmark and no visit count, bail out early from frequency calculation?
 
x)
 
make sure that we aren't doing too much work when a livemark gets updated, due to removing from hash
 
x)
 
+nsresult
+nsNavHistory::CalculateFrecency(PRInt32 aHidden, PRInt32 aTyped, PRInt32 aVisitCount, PRInt64 aPageID, nsIURI *aURI, PRInt32 *aFrecency)
+{
...
+#ifdef DEBUG
+ nsCAutoString spec;
+ if (aURI)
+ aURI->GetSpec(spec);
+ printf("XXX %d = frecency for [%s]\n", *aFrecency, spec.get());
+#endif
 
 
x)
 
first time, delay from adding column with -1
 
x)
 
first time, all bogus (need to take the top <x> and recalc), on migration and import from fx 2
 
x)
 
impact of hidden for bm: note, bm search now in open location and pref page
 
x)
 
on any visit, recalc
 
x)
 
on any erase visit, recalc
 
x)
 
when do I reval places I don't revisit? (expiration might be a long time). page with 10 visits in 1 day will have high frecenct
until I recalc
 
x)
 
cpu usage
 
 
x)
 
pref for chunk size
 
x)
 
make sure we stop searching once we hit max results?
 
x)
 
should drop down be frecency or visit date?
 
 
x)
 
we do need to recalculate frecency on history import?
 
x)
 
recalc on bm import / restore
234
edits

Navigation menu