Closed
Bug 1312226
Opened 8 years ago
Closed 8 years ago
Use async queries to read annos in `PlacesSyncUtils`
Categories
(Firefox :: Sync, defect, P1)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
Firefox 52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: lina, Assigned: lina)
References
Details
Attachments
(1 file)
The annotations service doesn't have an async API, and implementing a full one (bug 1295519) would require us to fire observers properly. We can at least avoid blocking the main thread for reads, though.
Comment hidden (mozreview-request) |
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8803659 [details] Bug 1312226 - Use async queries to read annos in `PlacesSyncUtils`. https://reviewboard.mozilla.org/r/87814/#review86906 This looks great, although it seems a missed opportunity in terms of that one remaining sync call :) ::: toolkit/components/places/PlacesSyncUtils.jsm:481 (Diff revision 1) > orphanGuids[i]} to ${item.syncId}`, ex); > } > if (isReparented) { > // Remove the annotation once we've reparented the item. > - PlacesUtils.annotations.removeItemAnnotation(orphanIds[i], > + let orphanId = yield PlacesUtils.promiseItemId(orphanGuids[i]); > + PlacesUtils.annotations.removeItemAnnotation(orphanId, removeItemAnnotation seems to have fairly simple SQL - is there a reason this hasn't been moved to be async too? Tweaking the sql to directly use a GUID would even save the promiseItemId
Attachment #8803659 -
Flags: review?(markh) → review+
Comment 3•8 years ago
|
||
(In reply to Mark Hammond [:markh] from comment #2) > removeItemAnnotation seems to have fairly simple SQL - is there a reason > this hasn't been moved to be async too? Tweaking the sql to directly use a > GUID would even save the promiseItemId Oh, you already mentioned that in comment 0.
Pushed by kcambridge@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c7ad8590b1e7 Use async queries to read annos in `PlacesSyncUtils`. r=markh
Updated•8 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c7ad8590b1e7
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
You need to log in
before you can comment on or make changes to this bug.
Description
•