File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1076,23 +1076,9 @@ void MainWindow::slotCompress(const QVariant &val)
10761076
10771077 bool bUseLibarchive = false ;
10781078#ifdef __aarch64__ // 华为arm平台 zip压缩 性能提升. 在多线程场景下使用7z,单线程场景下使用libarchive
1079- // 最大文件超过50MB使用libarchive
1080- if (maxFileSize_ > 50 * 1024 * 1024 ) {
1081- bUseLibarchive = true ;
1082- }
1083- // 总大小超过200MB使用libarchive
1084- else if (m_stCompressParameter.qSize > 200 * 1024 * 1024 ) {
1085- bUseLibarchive = true ;
1086- }
1087- // 总大小超过100MB且最大文件超过10MB使用libarchive(处理均匀分布的大文件)
1088- else if (m_stCompressParameter.qSize > 100 * 1024 * 1024 && maxFileSize_ > 10 * 1024 * 1024 ) {
1089- bUseLibarchive = true ;
1090- }
1091- // 大文件占比超过60%使用libarchive
1092- else {
1093- double maxFileSizeProportion = static_cast <double >(maxFileSize_) / static_cast <double >(m_stCompressParameter.qSize );
1094- bUseLibarchive = maxFileSizeProportion > 0.6 ;
1095- }
1079+ // 引入pzip后,性能大幅提升,不再需要区分libarchive和pzip,默认pzip,此处代码保留,避免后续有特殊数据造成性能劣化。
1080+ // double maxFileSizeProportion = static_cast<double>(maxFileSize_) / static_cast<double>(m_stCompressParameter.qSize);
1081+ // bUseLibarchive = maxFileSizeProportion > 0.6;
10961082#else
10971083 bUseLibarchive = false ;
10981084#endif
You can’t perform that action at this time.
0 commit comments