summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b831015)
raw | patch | inline | side by side (parent: b831015)
author | Martin Langhoff <martin@catalyst.net.nz> | |
Fri, 3 Mar 2006 03:38:03 +0000 (16:38 +1300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 3 Mar 2006 06:56:27 +0000 (22:56 -0800) |
Just by sending the files in an ordered fashion, clients can process them
much faster. And we can optimize our check of whether we created this
directory already -- faster.
Timings for a checkout on a commandline cvs client for a project with
~13K files totalling ~100MB:
Unsorted:
603.12 real 16.89 user 42.88 sys
Sorted:
298.19 real 26.37 user 42.42 sys
much faster. And we can optimize our check of whether we created this
directory already -- faster.
Timings for a checkout on a commandline cvs client for a project with
~13K files totalling ~100MB:
Unsorted:
603.12 real 16.89 user 42.88 sys
Sorted:
298.19 real 26.37 user 42.42 sys
git-cvsserver.perl | patch | blob | history |
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 7b3ba1b9de8f55df135c3d27b622aa5357b7e2b8..40b9c2af343051456bdfea9cacb1a404135145c2 100755 (executable)
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
print "E cvs checkout: Updating $checkout_path\n";
my %seendirs = ();
+ my $lastdir ='';
foreach my $git ( @{$updater->gethead} )
{
print "M U $checkout_path/$git->{name}\n";
}
- if (length($git->{dir}) && $git->{dir} ne './' && !exists($seendirs{$git->{dir}})) {
+ if (length($git->{dir}) && $git->{dir} ne './'
+ && $git->{dir} ne $lastdir && !exists($seendirs{$git->{dir}})) {
# Eclipse seems to need the Clear-sticky command
# to prepare the 'Entries' file for the new directory.
print "Clear-static-directory $module/$git->{dir}\n";
print $state->{CVSROOT} . "/$module/$git->{dir}\n";
print "E cvs checkout: Updating /$module/$git->{dir}\n";
+ $lastdir = $git->{dir};
$seendirs{$git->{dir}} = 1;
}
return $self->{gethead_cache} if ( defined ( $self->{gethead_cache} ) );
- my $db_query = $self->{dbh}->prepare_cached("SELECT name, filehash, mode, revision, modified, commithash, author FROM head",{},1);
+ my $db_query = $self->{dbh}->prepare_cached("SELECT name, filehash, mode, revision, modified, commithash, author FROM head ORDER BY name ASC",{},1);
$db_query->execute();
my $tree = [];