[distri] Re: Arch "yay", and alternative commands

  • From: Michael Stapelberg <michael+distri@xxxxxxxxxxxxx>
  • To: distri@xxxxxxxxxxxxx
  • Date: Fri, 31 Jan 2020 06:56:04 +0100

Sorry for the late reply. Answers inline:

On Thu, Jan 23, 2020 at 6:13 PM Sean Russell <ser@xxxxxxxx> wrote:


Hi,

As you may be aware, freelists.org claims "Error: Search database
doesn't exist. New lists aren't indexed immediately and lists that
haven't seen traffic in some time are no longer indexed."  This means I
wasn't able to search for my question, although I did try a Google
search using site:www.freelists.org, which also returned no good
matches.

Can you send a quick message about this at
https://www.freelists.org/contact.html please?


Many package managers are written in scripting languages; Arch's is
written in Python.  Some distributions also have alternative interfaces
to the package manager database; this is a common occurrence in Arch, and
one of the more popular ones is `yay`
(https://aur.archlinux.org/packages/yay/).  yay is written in Go, and
because of that (and probably other reasons), yay is *significantly*
faster than pacman, and fully feature-comparable.  I'm sure there are
analogues for other distributions.

The description for yay says “Yet another yogurt. Pacman wrapper and
AUR helper written in go.”

And indeed, yay does call out to pacman:
https://github.com/Jguer/yay/blob/3a5a6a77b36df440a06ca1bc63986c666c69e5cc/exec.go#L78

So I’m a bit confused how yay can be faster than pacman?


I would think that the proglang component would be a significant
consideration, but I haven't seen the choice of programming language
factored into the analysis of package manager speed.  Has anyone
performed a "package managers are slow" comparison using a popular,
improved package manager command replacement for Arch (or any other
distribution)?  Because yay does exist and, in fact, is implemented in
the same language as distri's manager, it would seem to relatively easy

I tried running the steps described in
https://michael.stapelberg.ch/posts/2019-08-17-linux-package-managers-are-slow/#qemu
with yay, but I’m having a hard time figuring out the specific
commands to run.

Could you provide the steps please?

to eliminate the language difference in the comparison; without
including that consideration, all of the other conclusions (about
removing hooks, etc) would be suspect, wouldn't they?

They’re not automatically suspect. One can reason about bottlenecks
and architecture without fully understanding every detail of the
programs involved. For example, the fact that running hooks must
happen sequentially is true regardless of any implementation details,
so that poses an inherent bottleneck on multi-core systems.



--- SER

Sean E. Russell
M: +1.610.203.1223
GPG key: 09E5788F
IM: @ser:matrix.ser1.net
Web: https://www.ser1.net

Other related posts: