Closed Bug 655728 Opened 14 years ago Closed 7 years ago

bookmarks.js::CreateRecord generates too many queries to the database

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mak, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [sync:bookmarks])

This method calls separate APIs to gather all information on an id. This could be fixed by allowing Places to query for a single node id (something like bug 497607), or by adding a getItemPropertiesForId to the bookmarks service. Or maybe could just wait for a new async API, provided this issue is taken into account.
Actually, once bug 633274 is fixed I could add a small transparent improvement, the bookmarks service could store a temporary hash of the last 10 (or such) queried ids and avoid the db for repeated requests to the same id. Would globally help a bunch of add-ons and would be easy/fast to do before we hack a new API.
(In reply to comment #1) > Actually, once bug 633274 is fixed I could add a small transparent > improvement, the bookmarks service could store a temporary hash of the last > 10 (or such) queried ids and avoid the db for repeated requests to the same > id. That sounds like a reasonable hack! Might also ameliorate Bug 655723, no?
(In reply to comment #2) > (In reply to comment #1) > That sounds like a reasonable hack! Might also ameliorate Bug 655723, no? no, what I cache includes basic item information, annotations can't be included in this simple hack (there could be any number of them). Practically with recent changes I'd have a single "getproperties" method and all getters go through it, so caching is easy.
Depends on: 814801
Whiteboard: [sync:bookmarks]
Depends on: 1302288
This now uses public Places APIs, and the mirror fetches all info in a single query.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.