Jan Alexander Steffens <jan.steffens@gmail.com> on Mon, 2014/12/22 04:08:
On Mon, Dec 22, 2014 at 3:25 AM, Mark Lee <mark@markelee.com> wrote:
Now that xz is multithreaded (not available in Arch Repos yet); I was wondering if package building and installing would, by default, utilize multiple threads.
Sure. I do use the multi-threaded version since the end of 2011 with my xz-git package [0] from AUR. Worked perfectly since then.
It won't, since the output of XZ in multi-threaded mode is different from single-threaded mode. This will break anything relying on getting repeatable output from compression.
Yes, the output is different (and usually a little larger) for streams larger than block-size. But that does not matter. Every xz version can decompress every xz-compressed stream - including those created with multi-threaded xz. For Arch packages there is nothing that requires repeatable output. Building a package will generate new output one way or another - even a changed package file timestamp will change the output. Or did I get you wrong here?
I'm not even sure it's possible to run XZ in multi-threaded mode with a single thread. xz -T1 uses single-threaded mode. xz -T1 --block-size=24M is also different from xz -T2 --block-size=24M.
Multi-threaded decompression also requires a stream created using multi-threaded mode.
Yes. But it falls back to single-threaded mode without complaints. [0] https://aur.archlinux.org/packages/xz-git/ -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}