On Fri, Nov 06, 2009 at 08:45:57PM +0100, Raphael Hertzog wrote: > Building iceape, before: > real 1m11.078s > user 0m22.501s > sys 0m36.946s > > After: > real 0m14.949s > user 0m9.377s > sys 0m2.948s
We can go even further, with another optimization. As appeared in the profiles, abs2rel and canonpath take a lot of time. It look like abs2rel is bloated for what it is used for. Replacing: my $fn = File::Spec->abs2rel($_, $new); with my $fn = length($_) > length($new) + 1 ? substr($_, length($new) + 1) : '.'; and my $fn = File::Spec->abs2rel($_, $old); with my $fn = length($_) > length($old) + 1 ? substr($_, length($old) + 1) : '.'; in add_diff_directory, make another 25% improvement. I'm now down to 25s on iceape-2.0-1 in 3.0 (quilt) format with a bzip2 tarball, which is much closer to bunzip2 (15s) + diff (2s), and down to 7s on the iceape-1.1.17-2 source (where it took 11s before, compared to your 15s). The canonpath calls disappear from the profile once the abs2rel calls are modified as stated above. Cheers, Mike -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org