Skip to content

Commit

Permalink
Merge pull request #56: Prefetch all files on clone
Browse files Browse the repository at this point in the history
Will disable later when doing sparse clone. This speeds up our functional tests (and any clone we do for local testing).

With the current count of functional tests, they run in 3-4 minutes instead of 5-7 minutes. As that list grows, this will be even more important.
  • Loading branch information
derrickstolee authored Aug 15, 2019
2 parents a2254b9 + 557fe5b commit 240fb46
Show file tree
Hide file tree
Showing 2 changed files with 683 additions and 659 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,10 @@ private void ExpandOneTempPack(bool copyPackBackToPackDirectory)
string[] packFiles = Directory.GetFiles(this.TempPackRoot, "pack-*.pack");
Assert.Greater(packFiles.Length, 0);

// Pick the first one found
string packFile = packFiles[0];
List<FileInfo> fileInfos = packFiles.Select(file => new FileInfo(file))
.ToList();
fileInfos.Sort((f1, f2) => (int)(f2.Length - f1.Length));
string packFile = fileInfos[0].FullName;

// Send the contents of the packfile to unpack-objects to example the loose objects
// Note this won't work if the object exists in a pack file which is why we had to move them
Expand Down
Loading

0 comments on commit 240fb46

Please sign in to comment.