On 29.01.2021 23:22, Roland Illig wrote:
On 26.01.2021 15:41, Mateusz Guzik wrote:3. avoidable temp files JobOpenTmpFile opens a file and later checks if anything was written to it. Not an actual patch, but a hack to demonstrate the fix can be found at the end. Looks like checking can be done upfront in O(1) time (not done in the patch below). i.e. about 44% of all temp files can be avoided at least in this workload.
Fixed in usr.bin/make/job.c 1.399, explained in usr.bin/make/unit-tests/jobs-empty-commands.mk. Thanks for the suggestion. Roland