A while ago - in July 2017 - I compared the performance of wimlib and DISM when creating a new backup.
DISM ran for 10 minutes and produced a WIM file of 13 GB
WimLib ran for 56 minutes and produced a WIM file of 12 GB
I performed these tests one after the other for the same partition on the same PC. No other processes were using significant resources. While WimLib is 8% more space efficient, the price of a more than fivefold execution time is pretty high, IMHO.
Is this a known issue?
Also, I was wondering if anybody has already done some serious performance optimization on the WimLib code; i.e. not just code review but code coverage measurement using professional tools and refactoring of hot paths?
Can I assume that (most) compiler and linker optimizations are enabled when the release version of WimLib is built for Windows using the Cygwin/mingw tool chain? I assume this is the way the officially released binaries are produced.
Are you sure you used the same options? Probably you used solid LZMS compression (--solid) with wimlib-imagex but XPRESS or LZX compression (no argument, /compress:fast, or /compress:maximum) with DISM. In a fair comparison, wimlib is normally significantly faster when capturing than DISM, because wimlib's compressors are better optimized --- see the benchmarks at https://wimlib.net/compression.html#Benchmarks.