Skip to content

[tests] Make ninja check-swift 4.1x faster on high-end workstations #22649

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

Conversation

davezarzycki
Copy link
Contributor

No description provided.

@davezarzycki
Copy link
Contributor Author

@swift-ci please smoke test

@jckarter
Copy link
Contributor

Will PR testing still run this test? Is there any way we can make the test itself faster and still get useful coverage from it?

@davezarzycki
Copy link
Contributor Author

There might be a better solution. This was just the quickest. Who owns this test?

@davezarzycki
Copy link
Contributor Author

PS – This test is almost as long as the entire validation test suite on my Linux box. :-(

@benlangmuir benlangmuir requested a review from nkcsgexi February 15, 2019 16:34
@benlangmuir
Copy link
Contributor

@nkcsgexi Most of the time in this test is spent in the python code that diffs the results. If I skip the diff, this test takes 10 seconds on my machine. With the diff it's around 80 seconds.

@davezarzycki
Copy link
Contributor Author

What’s wrong with classic-and-fast diff? Also, 10 seconds without the diffing is okay but not great. That’s still almost half of the entire ninja check-swift time on a fast workstation.

@benlangmuir
Copy link
Contributor

This test could also be trivially parallelized since it's running independently over each file and just reducing at the end to set the return code.

@harlanhaskins
Copy link
Contributor

harlanhaskins commented Feb 15, 2019

@davezarzycki IIRC the switch from diff was for Windows support.

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

The change looks reasonable to me! In longer term, we plan to rely more on the stress-tester to run SwiftSyntax on user projects; the importance of running on the stdlib source will decrease.

@benlangmuir
Copy link
Contributor

Here's a fix for the difflib slowness by first comparing for == before doing the slow diff. #22653

@davezarzycki
Copy link
Contributor Author

Abandoned in favor of #22653

@davezarzycki davezarzycki deleted the quadruple_ninja_check_swift branch February 15, 2019 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants