Skip to content

windows: testsuite is unreasonably slow #9585

Closed

Description

@ehuss

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?

Activity

  1. alexcrichton commented on Jun 16, 2021

    @alexcrichton
    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?

  2. added a commit that references this issue on Nov 4, 2022
    180ad91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions