Archive: Multithread compression and decompression in makensis


Multithread compression and decompression in makensis
Hi,

I have an automated script that produces an installer with makensis and the installer is run automatically for testing purpose. I noticed that only one core is in use during compression and decompression. I think that a multi-threaded compressor would be great for installer creation and for user installation as most of our modern computers have four cores...

What do you think of that?


If I remember correctly, there are some threads about this topic already.


What compression are you using? LZMA uses multithreading.

Stu


Compression Algo
Sorry, it seems that I "multi threaded" the topic ;)

Thanks for your fast answers!

I use the default algorithm. In the documentation, there is no mention of multi threading, and furthermore, the description seems to describe lzma as the slower one...

Extract:
"NSIS supports different compression methods, as explained here. ZLIB is the default compression method, which is fast and uses only a little bit of memory. LZMA is a good method for the creation of small installers for internet distribution. BZIP2 usually compresses better than ZLIB but not as good as LZMA, it is useful if you need lower memory usage or fast script compilation."

I'm a little bit confused...

Is it because the multithreading was added lately? Is it because even with multithreading, the compression is still slower? Should I benchmark for myself or I should pay confidence in the documentation?

Regards,


http://www.7-zip.org/7z.html

Personally, I always use LZMA. The only downside to its use is slow compression. On the other hand it has extremely good compression ratios and fast decompression.

Stu


we use LZMA, but on a multi-core build machine only one core appears to be utilized. Afrow UK indicated here that LZMA is multi-threaded, but that was a couple years ago.

Can anyone confirm whether or not LZMA is multi-threaded? It doesn't appear to be from what we can see when running with that option.


lzma can support multi-threaded compression but only if the compressor is coded to do it and NSIS uses a heavily altered version which is single-threaded (and i cannot remember if the multi-threaded lzma libraries were around when the NSIS lzma support was added).

-daz


ok, thanks for the clarification. so it sounds like there's no way currently to get multi-threaded compression with NSIS when building an installer? Do you know if there are any plans in this area to provide this?


so are there any plans to add support for multi-threaded compression?


i don't know. all i can suggest is looking through the bug / feature tracker and seeing if anything is in there but just being mentioned doesn't mean anything would happen (since it would need someone to find the time / inclination to work on it).

-daz


where is the bug tracker? I can't seem to find a link for it anywhere on the site here.


http://nsis.sourceforge.net/Bug_Reports

Stu