-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Replace file locking logic with subdirectory #285
Conversation
I just realized that the |
My new approach creates a temporary directory for each Anecdotically, the tests on one of my projects take ~36s with this PR and ~89s without. |
Is the 36s project open source? I am interested to assess how problematic it might be for the output from concurrent tests to be interleaved. |
Yes, you can take a look here: https://github.com/Sovereign-Labs/sovereign-sdk/tree/filippo/trybuild-repro. The timings you'll get are different from the ones I gave you because I originally ran my benchmarks against a private version of the codebase which has significant changes. But you'll notice the tests still take longer without the patch regardless. Steps to reproduce:
I get similar results with |
The vast majority of the time in your tests is being spent in the linker, because you are linking over 200 megabytes of dependencies into every individual test case. What I would recommend is: stick to only |
Thanks for the great suggestions. Just wondering though, what's the problem with the temporary directory approach? Naively, I assumed it would make things better for other use cases as well compared to locking. Also, putting all tests into one |
For my own use cases, this doesn't end up being an improvement. I think the most number of UI test cases I have in one project is Serde which has 101 currently, and the compilation of all of them takes only 330ms. In my other projects it's even less. So I'd rather have the generated Cargo.toml around for troubleshooting, than what this PR does with temporary directories. |
Hi, thanks for
trybuild
! I use all the time, and it's great.Sometimes, when I throw a lot of
#[test]
s attrybuild
, I notice that they take a really long time. It seems that it's because they all run serially and not in parallel. I was thinking it might be better to create a separate directory perRunner
and remove locking altogether, which would improve throughput.