]> git.ipfire.org Git - pakfire.git/commitdiff
archive writer: Don't compress in parallel
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 15 Feb 2025 12:04:21 +0000 (12:04 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 15 Feb 2025 12:04:21 +0000 (12:04 +0000)
There is almost no speed benefit here because most packages are rather
small so that Zstandard does not fan out. The result will however be a
couple of percent larger which is something we don't want.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/archive_writer.c

index f48f16b619400530f88b5a3257677eaaeb1b1700..493e05a97cf26ba0057c603262d4719f916b4433 100644 (file)
@@ -219,25 +219,6 @@ static int pakfire_archive_writer_setup_archive(struct pakfire_archive_writer* s
                                return -ENOTSUP;
                        }
 #endif /* ARCHIVE_VERSION_NUMBER >= 3007002 */
-
-#if ARCHIVE_VERSION_NUMBER >= 3006000
-                       // Fetch numbers of processors
-                       long processors = sysconf(_SC_NPROCESSORS_ONLN);
-
-                       if (processors > 1) {
-                               r = pakfire_string_format(value, "%ld", processors);
-                               if (r)
-                                       return r;
-
-                               // Try using multiple threads
-                               r = archive_write_set_filter_option(self->archive, NULL, "threads", value);
-                               if (r) {
-                                       ERROR(self->ctx, "Could not enable %ld threads for compression: %s\n",
-                                               processors, archive_error_string(self->archive));
-                                       return -ENOTSUP;
-                               }
-                       }
-#endif
                        break;
        }