It was six months ago, to the day, when I alluded to the fact that Emacs’
package menu needed to go async. The time it took to do a simple list-packages
bothered me the most, closely followed by having to go play Minesweeper every
time I did a package upgrade. The latter was partially addressed when I added
asynchronous package transactions to Paradox, but the former took a bit more
work. In Emacs 25.1, at last, the package menu is going async.
You don’t need to do anything special to benefit from this. As soon as you issue
M-xlist-packages, instead of those “Contacting host: ...” messages which
always foretell a many-second hang, the package menu will come up almost
instantly. The download of archive information will go on in the background, and
once it is done the new information is updated in place.
This has two big advantages.
A fraction of a second after issuing the command you’re already in the menu,
free to navigate, search, or mark stuff while the background download is
happening.
If you have multiple archives configured (which you should), they are fetched
simultaneously. So the entire download will be 2–4 times faster now, even if
you decide to sit and wait for it to finish.
It should be noted this only applies to refreshing. Package transactions
(installation, upgrade, and deletion) are still synchronous in package.el.
Async transactions where implemented for a while, but the outcome was quite far
from satisfactory. However, so as not to end on a sad note, you can always go to
Paradox for that.
Lastly, if you’re the kind of person that hates nice things, you can disable
this feature with the package-menu-async variable.
That should be enough about (a)synchronicity for the moment. Come back on
Monday, when we go into some big improvements on the filtering engine.
New in Emacs 25.1: Asynchronous Package Menu
28 May 2015, by Artur Malabarba.New in Package.el post series
It was six months ago, to the day, when I alluded to the fact that Emacs’ package menu needed to go async. The time it took to do a simple
list-packages
bothered me the most, closely followed by having to go play Minesweeper every time I did a package upgrade. The latter was partially addressed when I added asynchronous package transactions to Paradox, but the former took a bit more work. In Emacs 25.1, at last, the package menu is going async.You don’t need to do anything special to benefit from this. As soon as you issue M-x
list-packages
, instead of those “Contacting host: ...
” messages which always foretell a many-second hang, the package menu will come up almost instantly. The download of archive information will go on in the background, and once it is done the new information is updated in place.This has two big advantages.
It should be noted this only applies to refreshing. Package transactions (installation, upgrade, and deletion) are still synchronous in
package.el
. Async transactions where implemented for a while, but the outcome was quite far from satisfactory. However, so as not to end on a sad note, you can always go to Paradox for that.Lastly, if you’re the kind of person that hates nice things, you can disable this feature with the
package-menu-async
variable.That should be enough about (a)synchronicity for the moment. Come back on Monday, when we go into some big improvements on the filtering engine.
Tags: emacs-25, package, emacs,
New in Emacs 25.1: Filtering by status and archive »
« New in Emacs 25.1: User-selected packages
Related Posts
It’s Magit! And you’re the magician! in package
Emacs 25 is out! What are the new features and what were my predictions in emacs-25
validate.el: Schema validation for Emacs-Lisp in package
Content © 2019, All rights reserved. Icons under CC3.0.