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
Add a "no SVG animations" mode when discovering and running tests #9216
Comments
Hi @rvanlaar 👋 Thank you for reaching out. Can you try collapsing the test explorer when you run the tests and see if it makes a difference? Also, what is the output for the I can't reproduce your issue, so I could use your help with narrowing down the issue by modifying the extension code locally to decrease the refresh rate, building it on your machine and reporting your findings. There are several spinners in the test explorer:
Their refresh rate is 1ms, which you can modify here:
Its refresh rate is 1s, which you can modify there:
Thank you! |
Could you point me to the documentation required to build and install from github? |
The command is:
When running tests again I see the following happening: |
Thanks for you help. I changed both lines to 10000ms (10 seconds):
The bottom test spinner was updating every 10 seconds. Both changes didn't change the result.
How can I disable the spinner, or make it rotate more slowly to check if that's the problem? Regarding building the project: Could the readme be updated with build info? Nevert mind. I found the following: https://github.com/Microsoft/vscode-python/blob/master/CONTRIBUTING.md#setup
|
It's the SVG spinner that's causing the slowdowns. I replaced the file The GPU utilization was also in a more normal range, moving between 15 to 50 % ps. Opening the discovering-tests.svg file in Chrome results in 100% GPU usage with 2 to 18% IO for every CPU. |
For reference: I also created a chromium issue for it: |
Hi @rvanlaar, thank you for your investigation! Sorry I didn't get back to you sooner (timezones and all that), seems like you got it figured out after all 👍
My initial thought was that the test status refresh rate that was too high, but as you found out it seems like the SVG in itself is causing issues. The animation is built in vscode-python/resources/dark/discovering-tests.svg Lines 4 to 13 in f864c20
I wonder if it happens with any SVG with built-in animation keyframes, or if there is something in As for a solution, there's a workaround for now, and we can tweak this issue to be a feature request for a "no animations" mode (remember to 👍 your original comment to help us prioritize this fix). Thank you again for your help! |
We talked about it with the team and we have unfortunately decided we will not be moving forward with this idea. We think there isn't an enough widespread need for this to warrant the maintenance cost for the feature. FWIW, closing in favour of https://bugs.chromium.org/p/chromium/issues/detail?id=1036262. |
Thank you for your kind and thoughtful response. Personally I hope that you could look into not using moving SVG spinners by default. |
This issue can be closed. After looking more into this issue and the performance problems. |
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977): JediExpected behaviour
See minimal slowdown when running unittests via VScode vs the commandline.
Actual behaviour
When running the unittests (pytest and Django) with an intel GPU (UHD Graphics 620) they take around 100 seconds.
With an nvidia GPU around 25 seconds.
On the commandline it's around 22 seconds.
Steps to reproduce:
Or
and observe that it takes up so much CPU/GPU time that is slows the whole thing down.
It could be due to the spinner in the test explorer, because minimizing VSCode solves the problem.
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Console Log with sourcemap enabled for NVIDIA and Intel
https://gist.github.com/rvanlaar/603eae9dd4ccf7bf82f473f537acf1a3
The text was updated successfully, but these errors were encountered: