Skip to content
⌘ NSIS Forum Archive

Multithread compression and decompression in makensis

12 posts

partyzone#

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?
partyzone#
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,
Afrow UK#
7z, lzma, 7-zip, archiver, free, compression, zip, best, compress, solid, high, ratio, unzip, far, win32, 7zip, long, file, names


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
bytebucket#
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.
DrO#
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
bytebucket#
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?
DrO#
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