textual icon indicating copy to clipboard operation
textual copied to clipboard

Reduce Textual test suite runtime

Open darrenburns opened this issue 1 year ago • 5 comments

I think there are a few easy wins in here. This is from a run that took 33s total:

image

darrenburns avatar Aug 22 '24 09:08 darrenburns

I assume that's on CI? That top test took .46s locally.

Do you think we can get the xdist working on CI? Does it even have more than 1 core?

willmcgugan avatar Aug 22 '24 10:08 willmcgugan

Nope, it's locally. If I run it without xdist it takes 2.5 seconds. With xdist as part of the full test suite the results are pretty consistent for me (tried again and got 4.98s).

For reference: pytest --dist=loadgroup -n 16 --durations 25

darrenburns avatar Aug 22 '24 10:08 darrenburns

I get different results. I suspect the timings are obfuscated by the concurrency. Not all tests will get the same level of concurrency.

Screenshot 2024-08-22 at 11 09 15

willmcgugan avatar Aug 22 '24 10:08 willmcgugan

It's not concurrency because it's consistent for me even without xdist 😢 Must just be down to the different CPUs. Do you want to close this issue or review some of the tests that appear consistently here at some point?

darrenburns avatar Aug 22 '24 10:08 darrenburns

Keep it for a reference. But it doesn't seem a high priority. With the xdist, I still find the tests super zippy.

BTW I tweaked that slow test in the help panel PR. It was excessive.

willmcgugan avatar Aug 22 '24 10:08 willmcgugan

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

github-actions[bot] avatar Sep 12 '24 12:09 github-actions[bot]