Closed
Bug 1387446
Opened 7 years ago
Closed 6 years ago
Make the Downloads API methods that handle annotations asynchronous
Categories
(Toolkit :: Downloads API, enhancement, P3)
Toolkit
Downloads API
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: Paolo, Assigned: standard8)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxperf:p3][fxsearch])
Attachments
(2 files)
Methods like getPlacesMetaDataFor and the annotations cache in the DownloadHistory module are currently synchronous.
It should not be too difficult to change them to have asynchronous signatures, in preparation for making the Places annotations API asynchronous.
Reporter | ||
Updated•7 years ago
|
Priority: -- → P3
Updated•7 years ago
|
Whiteboard: [fxperf]
Updated•7 years ago
|
Whiteboard: [fxperf] → [fxperf:p3]
Updated•6 years ago
|
Whiteboard: [fxperf:p3] → [fxperf:p3][fxsearch]
Updated•6 years ago
|
No longer blocks: removeAnnotations
Reporter | ||
Comment 1•6 years ago
|
||
This has been partly fixed in bug 1468980, and only getPlacesMetaDataFor remains, right?
Nice job in bug 1468980, by the way. Thanks for simplifying the code!
Assignee | ||
Comment 2•6 years ago
|
||
(In reply to :Paolo Amadini from comment #1)
> This has been partly fixed in bug 1468980, and only getPlacesMetaDataFor
> remains, right?
I believe so, yes. I also have a patch ready for getPlacesMetaDataFor, but I'm just completing another patch to go with it before I upload that.
> Nice job in bug 1468980, by the way. Thanks for simplifying the code!
Thanks, no problem! It certainly seemed clearer that way when working with the newer APIs :-)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → standard8
Comment 3•6 years ago
|
||
Not just getPlacesMetaDataFor unfortunately, gCachedPlacesMetaData is still synchronous and uses getAnnotationsWithName that should go away.
Comment 4•6 years ago
|
||
obviously the 2 things can be splitted into separate bugs to keep things simpler.
Assignee | ||
Comment 5•6 years ago
|
||
From discussion with Marco on irc, the idea is to make gCachedPlacesMetaData be initialised asynchronously (which bug 1480049 is now likely to enable), and then we can add an API to history which will fetch all pages with certain annotations, e.g.
history.getAnnotatedPages(arrayOfAnnos) return Map("anno1" => [{page, content}, {page, content}]), "anno2" => ....);
Reporter | ||
Comment 6•6 years ago
|
||
So, gCachedPlacesMetaData would be initialized once asynchronously, for example when getList is called, then it would be the only place from which we read the metadata, and any changes would be written synchronously to gCachedPlacesMetaData and also asynchronously to the Places database, for the next session. Correct?
Assignee | ||
Comment 7•6 years ago
|
||
(In reply to :Paolo Amadini from comment #6)
> So, gCachedPlacesMetaData would be initialized once asynchronously, for
> example when getList is called, then it would be the only place from which
> we read the metadata, and any changes would be written synchronously to
> gCachedPlacesMetaData and also asynchronously to the Places database, for
> the next session. Correct?
Yes, that's what I'm heading towards. The obvious slight compromise is that we have to keep annotation details in memory, but that seems easier than the other options.
Assignee | ||
Comment 8•6 years ago
|
||
Depends on D2597
Assignee | ||
Comment 9•6 years ago
|
||
Depends on D4062
Reporter | ||
Comment 10•6 years ago
|
||
Comment on attachment 9003407 [details]
Bug 1387446 - Replace getAnnotationsWithName calls in DownloadHistory with new asynchronous PlacesUtils.history.fetchAnnotatedPages.
:Paolo Amadini has approved the revision.
Attachment #9003407 -
Flags: review+
Comment 11•6 years ago
|
||
Comment on attachment 9003408 [details]
Bug 1387446 - Remove nsIAnnotationService.getAnnotationsWithName.
Lina Cambridge (she/her) [:lina] has approved the revision.
Attachment #9003408 -
Flags: review+
Comment 12•6 years ago
|
||
Comment on attachment 9003407 [details]
Bug 1387446 - Replace getAnnotationsWithName calls in DownloadHistory with new asynchronous PlacesUtils.history.fetchAnnotatedPages.
Lina Cambridge (she/her) [:lina] has approved the revision.
Attachment #9003407 -
Flags: review+
Comment 13•6 years ago
|
||
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e1734b0648a9
Replace getAnnotationsWithName calls in DownloadHistory with new asynchronous PlacesUtils.history.fetchAnnotatedPages. r=paolo,lina
Comment 14•6 years ago
|
||
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f7c5d8d8be89
Remove nsIAnnotationService.getAnnotationsWithName. r=lina
Comment 15•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e1734b0648a9
https://hg.mozilla.org/mozilla-central/rev/f7c5d8d8be89
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•