ungoogled-software / ungoogled-chromium-debian

Debian, Ubuntu, and others packaging for ungoogled-chromium
386 stars 49 forks source link

optimizing get-orig-source #42

Closed ghost closed 4 years ago

ghost commented 4 years ago

I found a significant bottleneck in the get-orig-source target of the debian/rules makefile. The line that reads while read line; do rm -rf $line; done < $(removed) is slow due to executing the rm command once for every file to be removed. This can be greatly sped up by doing more work for each execution of the rm command by utilizing xargs. I replaced this line with xargs rm -rf < $(removed) and I saw that the total time taken was reduced by approximately 7 minutes. I think this could be worth incorporating as it should be a drop-in replacement. Thanks.

ghost commented 4 years ago

I have created a pull request for this, #44. Please review it. Thank you.

Eloston commented 4 years ago

Merged, thanks for the detailed explanations.