Places:Plan
Evolution of future work on Places, the SQLite-driven Bookmarks and History system.
Guessed Timeline
FF5 ---------------- FF6 ----------------------------------- FF7 ----------------------------- FF8 ------------->
\_ ANALYZE [LANDED] \_ Finish searches perf work [LANDED] \_ Schema changes [PARKED] \_ in-content UI
|_ [places-next-wanted] [INFLIGH] |_ Async bookmarks [PARKED]
|_ WAL size issues [TAKEOFF] |_ Mobile API audit [PARKED]
|_ Notifications for Sync [TAKEOFF] |_ [places-next-wanted] [INFLIGH]
|_ Finish UpdatePlaces [TAKEOFF]
|_ History backup [TAKEOFF]
|_ Microsummaries removal [LANDED]
Schema Changes
- GOAL: Database filesize reduction, performances, healthier management
- ETA: Firefox 7
- LEADER: TBD
- PRECONDITIONS: History backup
Create history backups
This is a precondition to stop caring about corruptions, downgrades, compatibility.
- PROPOSAL: per-host backups and expiration, csv-append-like.
- PRECONDITIONS out-of-mainthread file access? (append and remove)
- BUG: TBD
Coalesce titles across history and bookmarks
Strings are the largest database offender, we never use both titles and all the queries have to coalesce titles. Users want us to update titles automatically when they change if they didn't manually set a different bookmark title.
- PROPOSAL: keep only one title in moz_places, track whether it's expirable.
- BUG: TBD
Tags out of moz_bookmarks
Tags are actually folders, this is unefficient and takes a lot of filesize for nothing, searches are slow as well since subqueries suffer from missing indices.
- PROPOSAL: tags in a separate relational table.
- BUG: TBD
Livemarks out of moz_bookmarks
Livemarks are actually folders of temporary bookmarks, this is unefficient and causes unneeded database fragmentation.
- PROPOSAL: redesign from scratch.
- BUG: TBD
Remove dynamic containers support
They never worked, nuke them.
- PROPOSAL: Remove all related code, redesign from scratch.
- BUG: TBD
Kill moz_bookmarks table
Once titles are flattened to moz_places and dynamic containers killed, most of bookmarks data consists of hierarchical information, then just make them so.
- PROPOSAL: Flatten isBookmark tracking in moz_places, have tags and folders just be hierarchical descriptions of these entries.
- PRECONDITIONS: flattened bookmarks in moz_places, tags out of bookmarks.
- BUG: TBD
Re-evaluate history tracking information
We track each single step in the history visit chain, but these data are not really useful as of today, the UI mostly cares about the destination page, not about the full redirects chain, and walking it up is slow and unefficient. Sessions tracking has been removed, and adds useless data. Sync also missed some of these data.
- PROPOSAL: Simplify, remove redundant information, track only what matters.
- BUG: TBD
Keywords are unefficient
Currently these are a mostly-null column in moz_bookmarks, we should allow a 1_keyword->n_uris but not the opposite.
- PROPOSAL: Convert keywords to annotations? they are already being lazily cached by bookmarks service for performance and IO.
- BUG: TBD
- PRECONDITIONS: Better annotations management
Annotations are unefficient
Most of the annotations are simple boolean stuff, so they could be categorized as: dataless, with-data. Dataless annotations shouldn't take all the space they are today. With-data annotations on the other side allow for binary data, but that data should NOT be stored in the database, let's allow the filesystem to handle them. Side notes: Having separate page and item annotations is confusing for both API and code, unfortunately we allow to annotate folders and this could be problematic to flatten. Could favicons become binary annotations?
- PROPOSAL: Split dataless annotations to save space and get better performances.
- BUG: TBD
Evaluate Microsummaries removal
They are our largest js component, but only a few users use them, and never take off completely as a standard.
- PROPOSAL: Move microsummaries to an add-on.
- BUG: bug 524091
Evaluate bookmarks roots removal
Roots caused more bugs than benefits, UI can better use annotated folders in a simple 1-root hierarchy.
- PROPOSAL: Annotate special folders, 1-root hierarchy
- BUG: TBD
Async APIs
- GOAL: No UI-blocking tasks
- ETA: Firefox 7
- LEADER: TBD
Simpler and async querying API in js
The classical querying API is complicated by xpcom, we need a deCOM version of it, this was partially done for Jetpack, must be finished.
- PROPOSAL: Finish the work started for Jetpack, with a js module.
- BUG: TBD
Finish async favicons service
Favicons service is already partially async, but the work has to be completed on all APIs.
- PROPOSAL: Make all interface methods async.
- BUG: TBD
Finish async containerOpen
Folders work, but it was never used live.
- PROPOSAL: Evaluate if this is still the wanted approach.
- BUG: TBD
Async bookmarks API
Largely wanted for Sync and mobile.
- PROPOSAL: split a new interface, gather from what we did for history.
- BUG: TBD
Better Notifications
- GOAL: More performant observers
- ETA: Firefox 5
- LEADER: TBD
Give more informations to the observers
Our actual notifications don't tell anything to the observer, it will have to query again to know informations that the notifier already has.
- PROPOSAL: Add URI, GUID and whatever we can, poll Sync as a privileged user of our notifications.
- BUG: TBD
Avoid useless notifications traffic
Just changing position could sometimes fire a removed and a added notifications.
- PROPOSAL: Reduce observers traffic.
- BUG: TBD
In-content UI
- GOAL: Better user experience
- ETA: Firefox 7
- LEADER: TBD
Thumbnails service
Any in content UI will probably want pages screenshots, this issue can be coalesced with Sync needs, also look at other vendors suggestions for speed dial thumbs.
- PROPOSAL: Allow web authors to specify their own thumbs or make a new one with a tentative algo.
- BUG: TBD
As in most today-ish OS, simplify navigation in the Places hierarchies.
- PROPOSAL: History or Bookmarks breadcrumbs.
- BUG: TBD
Drag&Drop chrome-content
D&D code needs to be simplified and allow interaction with in-content UI.
- PROPOSAL: TBD
- BUG: TBD
Kill the Library
Should be moved in-content, long treeviews should be paged.
- PROPOSAL: TBD
- BUG: TBD
Donwloads in Places
Move downloads manager to a toolbar widget, and allow to track and manage all downloads in the in-content UI.
- PROPOSAL: TBD
- BUG: TBD
Better search-ability
We should allow the user to filter results from history and bookmarks better, also to allow more granular privacy removals.
- PROPOSAL: Revised in-content search UI
- BUG: TBD
Fulltext indexing
- GOAL: No tables scan on search
- ETA: TBD
- LEADER: TBD
Find a good tokenizer
The pages case is special, since the same profile can have visits in different locales, the tokenizer should be per URI. LibICU is nice but huge.
- PROPOSAL: TBD
- BUG: TBD
Measure perf win/loss
FTS can give nice boosts, but also perf loss in some case, have to figure out the right compromise.
- PROPOSAL: TBD
- BUG: TBD
Sync Needs
- Async bookmarks (bug 519514, see also https://wiki.mozilla.org/Places/AsyncAPIsForSync#nsIBookmarkInfo)
- Notifications work (GUIDs) (bug 633274 and bug 633266)
- finish UpdatePlaces (see dependents of bug 606966)
- use url strings not nsIURI (bug 636393)
Mobile Needs
- WAL size: force checkpoint
- Code audit for bad API usage
- Async Bookmarks
- Database size reduction
To-be-parsed stuff
- investigate use of templates
- more natural dragging through menus (diagonal dragging)
- Places performance tests
- Fix Cut in frontend, to avoid dataloss
- deCOM internal bookmarks and history observers
- Add UI for quick tagging
- Allow to search folders
- More reduction of writes and fsyncs
- reduce query volume
- awesomebar extensibility (frecency bonus, external providers, ...)
- tags in HTML export/import?
- Pluggable views
- make Most Visited better (show most visited typed uris)
- support for browser.chrome.favicons (bug 331228)