Closed Bug 1428350 Opened 7 years ago Closed 7 years ago

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

Categories

(Toolkit :: Places, enhancement, P3)

enhancement

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: standard8, Unassigned)

References

Details

(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.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.