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

Speed up pypy builder, which is slow due to coverage.py #834

Open
itamarst opened this issue Dec 14, 2023 · 10 comments
Open

Speed up pypy builder, which is slow due to coverage.py #834

itamarst opened this issue Dec 14, 2023 · 10 comments
Labels

Comments

@itamarst
Copy link
Contributor

itamarst commented Dec 14, 2023

Options:

  • Newer versions of coverage.py (post-6.4.1) apparently run a lot faster on PyPy. In practice, didn't help (see below).
  • Drop coverage usage on PyPy.
  • Just live with it and close this issue.
@itamarst
Copy link
Contributor Author

coverage.py 7.3.3 seems to take infinite amounts of time on PyPy for me, even slower than current CI using 4.3.1. Will try other versions.

@itamarst itamarst self-assigned this Dec 14, 2023
@itamarst
Copy link
Contributor Author

Pretty much every version I've tried is ludicrously slow on my computer, weirdly much slower than CI, so it's difficult for me to see if upgrading helps...

Another alternative is to skip collecting coverage on PyPy, which will speed it up a lot!

@itamarst itamarst removed their assignment Dec 14, 2023
@4383
Copy link
Member

4383 commented Dec 14, 2023

I'm currently doing some tests with different coverage versions, will post my observations here

@4383
Copy link
Member

4383 commented Dec 14, 2023

With version 7.3.3:

$ time tox
...
real    2m50.077s
user    1m29.733s
sys     0m6.130s

With current version (4.5.1):

$ time tox
...
real    3m4.032s
user    1m41.401s
sys     0m7.172s

On my local machine 7.3.3 is a bit faster.

@jstasiak
Copy link
Contributor

Another alternative is to skip collecting coverage on PyPy, which will speed it up a lot!

If it's slow enough to be an impediment then this feels like a reasonable solution.

@itamarst
Copy link
Contributor Author

I'm currently doing some tests with different coverage versions, will post my observations here

Your numbers are quite different than mine, mine just runs for 10+ minutes before I just give up and kill it. No idea what's different :(

@itamarst
Copy link
Contributor Author

itamarst commented Dec 14, 2023

As reference in CI it currently takes 10 minutes, vs 2 minutes for everything else. Given @4383's numbers it seems like upgrading to 7.3.3 should help, but maybe not enough.

@itamarst
Copy link
Contributor Author

Regardless, I probably need this for #638 so will upgrade in the branch for that.

@itamarst
Copy link
Contributor Author

itamarst commented Dec 14, 2023

#836 upgrades to 7.3.3 and there's no meaningful impact on runtime. There's only one tiny bit of code that checks for PyPy, and I bet it could just be made unconditional, in which case coverage on pypy can be dropped.

@itamarst itamarst changed the title Upgrade coverage to newer version to speed up PyPy Speed up pypy builder, which is slow due to coverage.py Dec 14, 2023
@4383
Copy link
Member

4383 commented Dec 14, 2023

I agree with that

@4383 4383 added the tests label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants