[file-roller: 3/8] Give thread count to libarchive xz
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller: 3/8] Give thread count to libarchive xz
- Date: Tue, 6 Apr 2021 05:44:29 +0000 (UTC)
commit f9a6d805e3671dfb489d96af612899dc1684f5c5
Author: Julian Groß <firedefender1 googlemail com>
Date: Sun Mar 14 20:04:23 2021 +0100
Give thread count to libarchive xz
src/fr-archive-libarchive.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/fr-archive-libarchive.c b/src/fr-archive-libarchive.c
index 12ab16e3..b8d87121 100644
--- a/src/fr-archive-libarchive.c
+++ b/src/fr-archive-libarchive.c
@@ -33,6 +33,7 @@
#include "file-utils.h"
#include "fr-error.h"
#include "fr-archive-libarchive.h"
+#include "fr-thread-count.h"
#include "gio-utils.h"
#include "glib-utils.h"
#include "typedefs.h"
@@ -1544,6 +1545,12 @@ _archive_write_set_format_from_context (struct archive *a,
}
if (compression_level != NULL)
archive_write_set_filter_option (a, NULL, "compression-level", compression_level);
+
+ /* set the amount of threads */
+
+ if (archive_filter == ARCHIVE_FILTER_XZ) {
+ archive_write_set_filter_option (a, NULL, "threads", fr_get_thread_count());
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]