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

Too slow for a large project #340

Closed
kdy1 opened this issue Feb 8, 2020 · 6 comments
Closed

Too slow for a large project #340

kdy1 opened this issue Feb 8, 2020 · 6 comments

Comments

@kdy1
Copy link

kdy1 commented Feb 8, 2020

While trying to add code coverage to swc, I hit timeout from github actions, which is 6 hours.
Without tarpaulin, it takes 13 minutes.

Related PR: swc-project/swc#634
Log; https://github.com/swc-project/swc/pull/634/checks?check_run_id=432131381

@xd009642
Copy link
Owner

xd009642 commented Feb 8, 2020

I'm not sure if I'd call that a mid-sized project it's just over 121kloc! There is a release flag for tarpaulin that builds and runs tests as release binaries though this could increase the impact of false negatives due to optimisations. I'm just going to run on my machine with and without the release flag and see how that impacts the time. Another option is excluding any particularly heavy tests

@xd009642
Copy link
Owner

xd009642 commented Feb 9, 2020

So on my system 16 minutes for the tests just doing cargo tarpaulin and exporting the CARGO_MANIFEST_DIR. There's probably some other variables I needed as some tests failed the release option didn't seem to speed things up, but I'd imagine the difference would only be significant if most of the heavy computation was done in 3rd party crates so it was a bit of a gamble

@kdy1
Copy link
Author

kdy1 commented Feb 9, 2020

@xd009642 For the first, thank you for trying it. The test of swc is slow because it spawns lots of node js process. So release mode will not help.

Another option is excluding any particularly heavy tests

This seems interesting. I'll try it on my linux machine

@kdy1 kdy1 changed the title Too slow for mid-sized project Too slow for large project Feb 9, 2020
@kdy1
Copy link
Author

kdy1 commented Feb 9, 2020

I agree. 121k loc is not a mid-sized. Changed the title.

@kdy1 kdy1 changed the title Too slow for large project Too slow for a large project Feb 9, 2020
@xd009642
Copy link
Owner

xd009642 commented Nov 3, 2020

@kdy1 the latest change in develop might speed things up by changing less linker args if you want to be brave and go for the latest commit on develop for your CI 😅

@xd009642
Copy link
Owner

Closing this issue as the llvm coverage backend is now released --engine llvm where tests will run as fast as they do in cargo test with the llvm coverage enabled (which is faster than ptrace for large projects)

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

No branches or pull requests

2 participants