[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-libunistring] Improve build parallelization patch submitted to
From: |
Bruno Haible |
Subject: |
Re: [bug-libunistring] Improve build parallelization patch submitted to vcpkg |
Date: |
Wed, 16 Nov 2022 04:29:39 +0100 |
Hi,
Billy O'Neal wrote:
> A contributor has asked to apply a patch to libunistring to improve build
> time by parallelizing some of the operations in the makefile:
> https://github.com/microsoft/vcpkg/pull/27819/
>
> Would you be willing to look at this patch and take it or indicate that you
> don't oppose vcpkg applying it?
As far as I understand the patch [1], it parallelizes a loop that compiles many
source files and collects the symbols defined by the resulting .o files, such
that
- the total elapsed time will shrink significantly (depending on the number
of CPUs available),
- the total CPU time remains the same,
- there is a code duplication: ca. 12 lines of code are duplicated,
- the resulting Makefile will not work any more with non-GNU make.
Therefore the patch is not appropriate for upstream.
Whether vcpkg applies it or not, is your choice. Whether optimizing the
elapsed time of a build is worth the cost of maintaining a patch that
cannot be upstreamed. Your choice.
Bruno
[1]
https://raw.githubusercontent.com/microsoft/vcpkg/5cad6642fcc4dcc2909fc4ecf3fc1b5f6b3d01be/ports/libunistring/parallelize-symbol-collection.patch