- NSIS Discussion
- Multithread compression and decompression in makensis
Archive: Multithread compression and decompression in makensis
partyzone
2nd June 2010 23:31 UTC
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?
MSG
3rd June 2010 05:57 UTC
If I remember correctly, there are some threads about this topic already.
Afrow UK
3rd June 2010 11:57 UTC
What compression are you using? LZMA uses multithreading.
Stu
partyzone
3rd June 2010 17:53 UTC
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
3rd June 2010 19:27 UTC
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
bytebucket
9th July 2012 15:27 UTC
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
9th July 2012 16:14 UTC
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
9th July 2012 19:30 UTC
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?
bytebucket
17th July 2012 17:00 UTC
so are there any plans to add support for multi-threaded compression?
DrO
17th July 2012 17:18 UTC
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
bytebucket
18th July 2012 19:29 UTC
where is the bug tracker? I can't seem to find a link for it anywhere on the site here.