Change makepkg.conf defaults to add threading

I don't see why this can't be default. As it doesn't really hurt anyone...
https://wiki.archlinux.org/index.php/Makepkg#Improving_compile_times

in /etc/makepkg.confby default then:

MAKEFLAGS="-j$(nproc)"
COMPRESSXZ=(xz -c -z - --threads=0 )

In their respective places. First of them is commented out by default and second doesn't multithread.

This has already been discussed:
https://forum.manjaro.org/t/enhancing-building-speed-in-pamac-by-altering-compression-type

Choosing a different compression algo has zero influence on compilation times.
Makeflags do, of course.

1 Like

And there are many reasons someone would not want all of their threads allocated to compilation.

Arguing that it should be set 1/2 or 3/4 is one thing... but setting it max does not seem a sane default.

@torvic9.. while they do use some compression flags there, I think (again) their main point was to max processor threads.

.. If anyone is interested .. heres a snippet for using 1/2:

MAKEFLAGS="-j$(($(nproc)/2))"
1 Like

I don't know if it's still a thing, but back in my LFS days...there were more than a couple of programs that would not compile multi-threaded.

GCC would just die...no errors, nothing. Just a flashing cursor.

Using more threads to compress the packages is, in my opinion, an equal important one.
Building large packages, like kernels and browsers, will take ages to compress with only 1 thread.

1 Like

Ideally, these programs should have options=('!makeflags') in their PKGBUILDs, and provide their own makeflags.

2 Likes

Forum kindly sponsored by