FS#60334 - [xz] Multi-Threading is not enabled by default

Attached to Project: Arch Linux
Opened by Arthur Borsboom (ArthurBorsboom) - Sunday, 07 October 2018, 10:45 GMT
Last edited by Eli Schwartz (eschwartz) - Sunday, 07 October 2018, 15:26 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: Enable XZ multi-threading to reduce compression time

Additional info:
core/xz 5.2.4-1

Since XZ version 5.2.0 (2014-12-21) multi-threading is supported (https://git.tukaani.org/?p=xz.git;a=blob;f=NEWS;hb=HEAD), however by default it is disabled.
One of the ways to enable it, is by setting an environment variable.

export XZ_OPT="--threads=0"

Can multi-threading be enabled by default?

This would reduce compression time on multi core systems, including for the package manager (pacman/yaourt).
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Sunday, 07 October 2018, 15:26 GMT
Reason for closing:  Not a bug
Additional comments about closing:  No, no, no, and no. The xz developers have very good reasons for not wanting this, we're not going to fork the program just to save you from opting into a non-default feature.
Comment by Eli Schwartz (eschwartz) - Sunday, 07 October 2018, 15:25 GMT
This is the default for a reason. One of the reasons is because the output is not reproducible, so if we were to enable it in xz and thereby break many peoples' workflow, we'd have to immediately disable it by hardcoding --threads=1 in makepkg's default configuration, thereby preventing your use case.

Furthermore, the default is *hardcoded* in xz. There is no compile-time option to enable threads by default, only a compile-time option to enable a command-line argument opting into threads.

Again, this is for a reason...

Loading...