Downloads API update update

Paolo Amadini paolo.02.prg at amadzone.org
Tue Jun 18 16:02:19 UTC 2013


Hello, this is an update on the Downloads API update!

We've been working for some time on a new JavaScript API for downloads,
that is replacing the legacy C++ implementation, and we're approaching
the stage where we can look into integrating the new API with its
various consumers.

If you're working on anything related to downloads, including add-ons or
parts of Mozilla products, this change is going to be relevant to you
(and hopefully make your life easier), over the next few months.

The new API is designed from the start to be asynchronous, and will be
simpler than the current one, that requires direct database access to
handle the list of downloads. In fact, our first target is to improve
responsiveness when downloads are started, by removing all the
main-thread I/O caused by database access. Over time, the API will
also make broader architecture and behavior improvements possible.

We're focusing our efforts on Firefox for Desktop initially, with
changes to the Downloads Panel and the Library, and outreach to Desktop
add-on developers. We expect to be able to migrate at the end of the
Firefox 25 release cycle or the beginning of Firefox 26. Other Mozilla
products may migrate on their own schedule, in order to benefit
from the performance improvements.

At present, only the basic interfaces are implemented, and we're still
planning to revise method names or object structure as needed, but the
API is available in Toolkit and can already be experimented with:

https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Downloads.jsm

There are still several unimplemented features at this point. If you are
interested, you can see the currently planned work on the project here:

https://bugzilla.mozilla.org/showdependencytree.cgi?id=825588&hide_resolved=1

I'll send out more updates as we reach relevant milestones (like the
stabilized consumer API tracked by bug 881058). These will include more
technical details and more structured outreach to broader audiences
than firefox-dev (though this will continue to be the main development
forum for the project).

If you have any questions or feedback, feel free to reply to this
message or contact myself directly. If you identify specific needs
for the API, you may also file a new bug, and mark it as blocking
bug 825588.

Cheers,
Paolo



More information about the firefox-dev mailing list