Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefetch all files on clone #56

Merged
merged 2 commits into from
Aug 15, 2019
Merged

Prefetch all files on clone #56

merged 2 commits into from
Aug 15, 2019

Conversation

derrickstolee
Copy link
Contributor

@derrickstolee derrickstolee commented Aug 14, 2019

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.

Scalar/CommandLine/CloneVerb.cs Show resolved Hide resolved
Will disable later when doing sparse clone

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
@derrickstolee
Copy link
Contributor Author

/azp run microsoft.scalar

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@jrbriggs jrbriggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice speedup!

@derrickstolee
Copy link
Contributor Author

...adding a comment made the Mac functional tests sit forever. Ordering the tests that were not reporting logs fixed the problem...

I don't even know anymore. I'll wait until morning for this one.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
@@ -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))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to repro the functional test hang, and it is related to unpacking the prefetch pack. To fix the problem long-term, we will want to make these tests use the sparse mode, which avoids the prefetch. Temporarily, we can select the smallest pack to turn into loose objects.

@derrickstolee derrickstolee merged commit 240fb46 into microsoft:master Aug 15, 2019
This was referenced Aug 16, 2019
derrickstolee added a commit that referenced this pull request Aug 21, 2019
Long term, we will not have a mount, so this feature will
eventually be meaningless. In the meantime, it is only causing
possible problems with hydrating files.

Resolves #26 permanently. In a normal clone, we already resolved
it in #56 by prefetching all files on clone. However, we still
dynamically prefetch on a sparse clone (#54).
@derrickstolee derrickstolee deleted the prefetch-on-clone branch November 18, 2019 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants