234
edits
Changes
no edit summary
15)
add frecency <> 0 to ac queriesbecause...
16)
add code so that for all non place: and unvisisted children of livemarks we set frecency to 0, so that we can use it after migration, clear all private data, etc
17)
are there any undesirable side effects of clearing hidden after recalculating frecency?
I don't think so, as visiting a bm would unhide it, and then you could always clear private data or remove the visit to have the same effect.
18) note, bookmarks also no in open location and pref page autocomplete (all history autocomplete)
19) after v7 schema migration, run fix it method so place: and unvisited livemark items don't show up, as our migration sets frecency to -1
20)
for the code that resets to -1, better to fix existing code skip over place we will reset to 0, or do what I'm doing and query and reset to 0. note, need the fix it code for after migration, so this keeps it simple. need to verify if my query is a perf issue with lots of history. (less concerned after marco's index fix, however.)
21)
for the ac queries, sort by freceny, 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)
should we add "AND h.frecency <> 0" to our autocomplete queries?
yes, because take the following scenario:
a) an unvisited livemark items get frecency of 0, since not a bookmark
b) visit that livemark item, frecency of non 0, shows up in ac, no longer hidden since frecency is non 0.
c) clear history, livemark item no longer hidden, would should up in ac until we recalc on idle
d) I added code FixInvalidFrecenciesForExcludedPlaces() so that we will reset place: and unvisited livemark item frecency to 0 after clear history, expire, etc to solve this problem.
what about migration or first run? as long as we call FixInvalidFrecenciesForExcludedPlaces() we are good.
why <> 0 and not > 0. We want invalid frecencies to show up in ac, as those are bookmarks, migrated places, places after clear all private data, etc before we got a chance to recalculate.
23)
from the ac queries, why remove hidden <> 1
unvisited bookmarks from previous versions will be hidden until visited, but we want them to show up in ac. for stuff we really want hidden, set frecency to 0, like place: and unvisited livemark items. (is there more?)
'''todo'''
x)
should we get rid of the hidden column? x) for the ac queries, sort by freceny, then typecalc frecncy, then count because we might not hve frecencynever calc 0 unless place: or unvisit livemark item, so lots of tiesdo 1.
x)
x)
everything gets frecency of -1, until we visit something or recalc on idle. for fx2 migration, when calc frecncywe import history, never calc 0 unless place: we can recalc (some?) at the end. for fx3b2 migration, we can recalc some at the end. and then wait for idle? on clear all data (and bm import or unvisit livemark item, so restore? should we do 1.a quick recalc of bookmarks? what if they have a lot of bookmarks? should part of our work on idle be to recalc bookmarks?
x)
for the code that resets to -calc frecncy, never calc 0 unless place: or unvisit livemark item, so do 1.x) when calc frecncy, better to skip over stuff, never calc 0 unless place: or fix it afterwards? noteunvisit livemark item, need it anyways for after migrationso do 1.
x)
verify we check oldVisitCount and frecency = -1 everywhere we should be.
x)
x)
x)