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

windows: testsuite is unreasonably slow #9585

Closed
ehuss opened this issue Jun 15, 2021 · 1 comment · Fixed by #11333
Closed

windows: testsuite is unreasonably slow #9585

ehuss opened this issue Jun 15, 2021 · 1 comment · Fixed by #11333
Labels
A-testing-cargo-itself Area: cargo's tests C-bug Category: bug O-windows OS: Windows Performance Gotta go fast!

Comments

@ehuss
Copy link
Contributor

ehuss commented Jun 15, 2021

Problem
Cargo's testsuite is unreasonably slow the second time it is run on Windows. On my system, it goes from 75s to 233s (a roughly 3x slowdown). The cause is #7042, or rather Windows' poor filesystem performance. Using rm on the cit directory still takes about 40s (!), but 75+40 is still a factor of 2 away from 233.

I don't know if substantial improvements can be made, but I'm opening this issue to see if anyone can brainstorm some ideas. I'm wondering if remove_dir_all has a high performance hit, in which case maybe another solution would work better?

I'm also wondering if the slow removal is related to the properties of the files in the testsuite. For example, there are a bunch of NTFS junction points and read-only files (I think, at least the git pack files can't be deleted normally).

I also wonder if doing anything in parallel would help or hurt?

@ehuss ehuss added C-bug Category: bug O-windows OS: Windows A-testing-cargo-itself Area: cargo's tests Performance Gotta go fast! labels Jun 15, 2021
@alexcrichton
Copy link
Member

One potential improvement would be that instead of deleting the directory we simply move it out of the way. For example we could move it into a please-delete-everything-in-here directory. The start of the test suite could maybe spawn a background thread to delete that folder so it doesn't affect the rest of the test suite, and if it doesn't finish that doesn't matter too much since we'll pick up next time cleaning it up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing-cargo-itself Area: cargo's tests C-bug Category: bug O-windows OS: Windows Performance Gotta go fast!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants