Closed Bug 1428350 Opened 6 years ago Closed 6 years ago

Only update RESULTS_AS_ROOTS_QUERY when needed - ensure it is updated when showMobileBookmarks pref is changed


(Toolkit :: Places, enhancement, P3)






(Reporter: standard8, Unassigned)



(Keywords: perf, Whiteboard: [fxsearch])

In bug 1423896, we've created a RESULTS_AS_ROOTS_QUERY to replace the old left-pane queries.

As part of the change, the query is updating according to QUERYUPDATE_COMPLEX_WITH_BOOKMARKS - i.e. with any bookmark change.

We don't think the perf impact will be significant for general use, as it only affects left-pane queries.

However, we should consider changing it so that it only updates when needed. At the moment, this is only when the "browser.bookmarks.showMobileBookmarks" preference changes.

For example, we could create a new query update type of QUERYUPDATE_COMPLEX_WITH_PREFS, and have that add a listener to Preferences::AddStrongObserver (or weak), which then listens for the preference change and refreshes appropriately.

Currently, we aren't listening for the pref change, and so we're at risk of not updating existing open views correctly until the next bookmark change after the pref change. The only case I can see for this at the moment is if the mobile bookmark count goes down to 0, which we think will be a rare case.
Keywords: perf
Priority: -- → P3
Whiteboard: [fxsearch]
We actually fixed this as part of bug 1423896.
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.