Closed Bug 1846361 Opened 2 years ago Closed 2 years ago

Consider to remove DB access in nsNavHistoryResultNode::GetTags()

Categories

(Toolkit :: Places, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: daisuke, Assigned: daisuke)

References

(Depends on 1 open bug)

Details

(Whiteboard: [sng])

Attachments

(2 files)

This is a follow-up bug of bug 1829581.
As mentioned in phabricator, we shoud consdier to remove nsNavHistoryResultNode::GetTags().

A little bit off-topic, but trying to keep together some thoughts.
This should be the last main-thread SQL in nsNavHistoryResult apart from the GetQueryResults call in FillChildren, that is used by Refresh(), OpenContainer(), OpenContainerAsync... and GetHasChildren(). The scope is to make only open and refresh operations execute queries, to simplify making those async.
For nsNavHistoryFolderResultNode::GetHasChildren asynchronous may be feasible, we would show no twisties until the querying is done, then invalidateRow in the tree. Though there's a lot of usage of .hasChildren to verify in the treeview, as it may break features.
Or alternatively we may keep a map of bookmark folders in memory, loaded at startup and updated through triggers.

I started filing Bug 1846461 to start moving some stuff out of the "bookmarks" service (that in reality is pretty much a "SynchronousTagsAsBookmarks" service).

Whiteboard: [sng]
Blocks: 1845040
No longer blocks: 1845040
Depends on: 1845040
Depends on: 1852026
Assignee: nobody → daisuke
Status: NEW → ASSIGNED
Attachment #9353351 - Attachment description: WIP: Bug 1846361: Avoid accessing DB in GetTags() → Bug 1846361: Avoid accessing DB in GetTags()
Summary: Consider to remove nsNavHistoryResultNode::GetTags() → Consider to remove DB access in nsNavHistoryResultNode::GetTags()
Pushed by dakatsuka.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/99ae6c3bb49d Unify NotifyIfTagsChanged into OnItemTimeChanged r=places-reviewers,mak https://hg.mozilla.org/integration/autoland/rev/2ed041c3a569 Avoid accessing DB in GetTags() r=mak
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Regressions: 1861811
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: