-
-
Notifications
You must be signed in to change notification settings - Fork 140
Description
bit7z version
4.0.x
Compilation options
No response
7-zip version
v23.01
7-zip shared library used
7zxa.dll / 7zxa.so
Compilers
MSVC
Compiler versions
No response
Architecture
x86_64
Operating system
Windows
Operating system versions
No response
Bug description
I created a bit7z decompression test program. The core code relies on the bit7z library and calls decompression-related code. I made two versions: Test Program 1 uses bit7z 3.1.5, and Test Program 2 uses bit7z 4.0.10. The purpose is to test the performance of the two versions on file decompression. The main logic code is as follows:
Main logic code for Test Program 1:
double testBit7zVersion(const std::string& dllPath) {
bit7z::Bit7zLibrary lib(dllPath);//dllPath:7zxa.dll,23.01
bit7z::BitFileExtractor extractor{ lib, bit7z::BitFormat::SevenZip };
cleanOutputDir();
auto start = std::chrono::high_resolution_clock::now();
try {
extractor.extract(ARCHIVE_PATH, OUTPUT_DIR);//ARCHIVE_PATH:output/test.7z
}
catch (const std::exception& e) {
std::cerr << "uncompress failed: " << e.what() << "\n";
return -1;
}
auto end = std::chrono::high_resolution_clock::now();
return std::chrono::duration_caststd::chrono::milliseconds(end - start).count();
}
Main logic code for Test Program 2:
double testBit7zVersion(const std::wstring& dllPath) {
bit7z::Bit7zLibrary lib(dllPath);//dllPath:7zxa.dll,23.01
bit7z::BitExtractor extractor{ lib, bit7z::BitFormat::SevenZip };
cleanOutputDir();
auto start = std::chrono::high_resolution_clock::now();
try {
extractor.extract(ARCHIVE_PATH, OUTPUT_DIR);//ARCHIVE_PATH:output/test.7z
}
catch (const std::exception& e) {
std::cerr << "uncompress failed: " << e.what() << "\n";
return -1;
}
auto end = std::chrono::high_resolution_clock::now();
return std::chrono::duration_caststd::chrono::milliseconds(end - start).count();
}
The test file 'test.7z' is 3.53GB in size.
Six same configuration test machines, configured as follows:
The results of testing the time taken to decompress the same test.7z file on 6 test machines:
On machines 4, 5, and 6, version 4.0.10 of bit7z was more than 6 times slower than version 3.1.5.
Steps to reproduce
No response
Expected behavior
No response
Relevant compilation output
Code of Conduct
- By submitting this issue, I agree to follow bit7z's Code of Conduct