Places:AutoComplete: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
(Please comment by clicking "discussion" above, and not be editing this page.)
(Please comment by clicking "discussion" above, and not by editing this page.)


== Possible algorithmic changes ==
== Possible algorithmic changes ==

Revision as of 06:36, 3 January 2006

(Please comment by clicking "discussion" above, and not by editing this page.)

Possible algorithmic changes

Places (Firefox 2.0) will not likely see a large change in the AutoComplete algorithm. However, there are some simple low-risk changes that we might consider making.

  • Better use of the "typed" flag (set for URLs that have ever been entered in the address bar). The current implementation gives typed URLs a constant boost over non-typed URLs. It would be nice to weight the various parameters by time, so a recent typed URL would still take precidence over something visited several times but many weeks ago.
  • When considering the aforementioned "aging" of priority, we might want to take into account browsing behavior. It sucks to come back from a two-week vacation and have all your history and autocomplete expired. At startup, we can detect periods of little or no activity and adjust the aging parameters accordingly.
  • Give some boost to bookmarked URLs.

Performance with the new database

If a significant amount of history will be stored, a much more efficient method of searching will be required (the current implemtation searches all of history for matches).

The database can be queried for URLs matching multiple criteria: recency, popularity, and type-edness. We can probably encode some of the ranking in a query. For example, select all pages visited in the last n days OR where (visit count - days last visited ago > 1). This will save us from ranking most of the pages in the user's history.

We might want to consider another column in the histroy DB for autocomplete purposes. This would just contain the URL minus the protocol type and with the common prefixes stripped (the corrent implemetation strips "www" and "ftp", and we'll probably just continue this). Then an index could be created on this column and we can quickly find matching pages without schlepping through all of them comparing strings.