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 some draw bounds tests #1571

Merged
merged 1 commit into from Feb 8, 2020

Conversation

charlesej
Copy link
Contributor

This update addresses the comment/issue mentioned by @MightyJosip in issue #1212 that the test_arc__bounding_rect() test is performing a lot of iterations and taking much longer than the other draw test cases. Changes were also made to some of the other draw bounds tests (ellipse/polygon/rect) to reduce their test times.


Overview of changes:

  • Reduced the size of the surfaces being checked
  • Reduced the number of iterations on some of the test parameters

Test details:

  • ran three passes to average out times
  • baseline
    • python: 3.8.1 (64bit)
      • cmd: python -Wd -m pygame.tests draw_test
        • Ran 205 tests in 57.065s
        • Ran 205 tests in 50.898s
        • Ran 205 tests in 50.937s
  • with changes to bounding tests
    • python: 3.8.1 (64bit)
      • cmd: python -Wd -m pygame.tests draw_test
        • Ran 205 tests in 5.777s
        • Ran 205 tests in 5.869s
        • Ran 205 tests in 5.565s
    • python: 2.7.10 (64bit)
      • cmd: python -Wd -m pygame.tests draw_test
        • Ran 205 tests in 8.432s
        • Ran 205 tests in 6.878s
        • Ran 205 tests in 7.097s

System details:

  • os: windows 10 (64bit)
  • python: 3.8.1 (64bit) and 2.7.10 (64bit)
  • pygame: 2.0.0.dev7 (SDL: 2.0.10) at 2ff089b

- Reduced the size of the surfaces being checked
- Reduced the number of iterations on some of the test parameters
@MightyJosip
Copy link
Contributor

Thanks, in my opinion it looks great

Copy link
Member

@illume illume left a comment

Choose a reason for hiding this comment

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

Now that's a speedup!

@illume illume merged commit e07618a into pygame:master Feb 8, 2020
@charlesej charlesej deleted the speed-up-bounds-tests branch February 8, 2020 14:21
@illume illume added the draw pygame.draw label May 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draw pygame.draw
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants