Open dickreuter opened 9 months ago
Hello! Would you be able to describe your use case further so we can look into the issue? If you could include an outline of your project structure (or example project which you see this behavior) and why it feels slow we can go from there. Thanks!
The best way to see how slow the native test explorer is, just run all pytests tests of any project. Then get the Python test explorer for Visual Studio code extension, and run all the tests with that extension. You will see that there's a speed difference of more than 2x. The native test explorer is much slower.
For example try this project and set up pytest: https://github.com/dickreuter/Poker
Any other project will experience the same.
By native you mean without the python extension? @connor4312, what are you thoughts here?
By native I mean without the Test Explorer UI, which is abandoned and recommends switching to vs code native testing. https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer
understood- we have a few thoughts on improving performance I will investigate this further. Thanks
I can confirm the issue: I have a Python project where running the pytest suite takes 0.2s - 0.3s in Pycharm, whereas VSCode's native Test Explorer takes between 5 and 7 seconds, that's a slowdown of more than a factor of 25. Interestingly, running the tests in a Windows terminal (not in VSCode), the tests take around 1.0s to 1.8s. That's slower than in Pycharm, but still siginificantly faster than VSCode. Don't know what kinds of optimizations Pycharm does here, but it would be a start if VSCode wouldn't be slower than the terminal.
Running tests in pycharm are much faster than in vscode. This poses a significant disadvantage for vscode for any serious Python project that has a large test suite.