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.
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 withxargs 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.