-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Extension causes high cpu load #6319
Comments
CPU profile states that you had this issue while running the following file, Please try running the python file, it uses |
I have the same problem. I checked this Here's the beginning of my ms-python.python-unresponsive.cpuprofile.txt file (the rest is only a number list){
"nodes": [
{
"id": 1,
"callFrame": {
"functionName": "(root)",
"scriptId": "0",
"url": "",
"lineNumber": -1,
"columnNumber": -1
},
"hitCount": 0,
"children": [
2
]
},
{
"id": 2,
"callFrame": {
"functionName": "processTimers",
"scriptId": "75",
"url": "timers.js",
"lineNumber": 208,
"columnNumber": 22
},
"hitCount": 0,
"children": [
3
]
},
{
"id": 3,
"callFrame": {
"functionName": "listOnTimeout",
"scriptId": "75",
"url": "timers.js",
"lineNumber": -1,
"columnNumber": -1
},
"hitCount": 0,
"children": [
4
]
},
{
"id": 4,
"callFrame": {
"functionName": "tryOnTimeout",
"scriptId": "75",
"url": "timers.js",
"lineNumber": -1,
"columnNumber": -1
},
"hitCount": 0,
"children": [
5
]
},
{
"id": 5,
"callFrame": {
"functionName": "ontimeout",
"scriptId": "75",
"url": "timers.js",
"lineNumber": 417,
"columnNumber": 18
},
"hitCount": 0,
"children": [
6
]
},
{
"id": 6,
"callFrame": {
"functionName": "module.exports.f.scheduleDocument.p.pendingDocs.set.setTimeout",
"scriptId": "169",
"url": "pii_removed/extension.js",
"lineNumber": 74,
"columnNumber": 295074
},
"hitCount": 0,
"children": [
7
]
},
{
"id": 7,
"callFrame": {
"functionName": "checkDocument",
"scriptId": "169",
"url": "pii_removed/extension.js",
"lineNumber": 74,
"columnNumber": 295119
},
"hitCount": 0,
"children": [
8
]
},
{
"id": 8,
"callFrame": {
"functionName": "lookForImports",
"scriptId": "169",
"url": "pii_removed/extension.js",
"lineNumber": 74,
"columnNumber": 295426
},
"hitCount": 0,
"children": [
9
]
},
{
"id": 9,
"callFrame": {
"functionName": "exec",
"scriptId": "0",
"url": "",
"lineNumber": -1,
"columnNumber": -1
},
"hitCount": 39144
}
],
"startTime": 88553631210,
"endTime": 88558735322,
"samples": [
9, If you need any other info I'd be glad to provide them... |
@ZRunner, please upload the entire comments if cpuprofile.txt, we don't basically scan it for issues, we lost it into chrome to analyse the profiler info. |
Here it is, sorry ms-python.python-unresponsive.cpuprofile.txt |
@ZRunner Are you using the same interpreter for both workspaces, what's different? |
I'm not sure of what you mean by interpreter, because I am pretty new in this world, but it is exactly the same global settings for VSC (same python path to /usr/local/bin/python3 because Mac, which points to python 3.7.3). The only difference I can see is that there is more files on this workspace (maybe about 30 python files). |
@ZRunner I have a potential fix that I just landed. Once CI finishes and the developer build of the extension gets pushed would you be willing to test it to see if it solves your problem? If so I can let you know when and where to download the development build from. |
@Patechoc Can you please inform if you are using a network drive. Also, please copy and paste the Output from |
@brettcannon I just tested it, and weirdly it seems to work again. I don't know why, maybe a VSC update that I didn't see? No idea. But if you want, I still can test your potential fix. i'd be glad to help you. (And no, I don't use any external disk currently.) |
@ZRunner You can download the in-development build of the extension by following the instructions at https://github.com/microsoft/vscode-python/blob/master/CONTRIBUTING.md#development-build . |
@brettcannon I just tested it with a few workspaces, for now I don't see any problem anymore. If the problem still happens I will post a new message here with more details. The current version I have, according to VSCode, is the 2019.6.24211 (I saw a more recent number with a -dev suffix but the app reloaded by itself and it disappeared). Thanks for the quick help! |
@ZRunner I just had that happen to me myself. I had to do it twice to get it to say |
@ZRunner Actually, it's a funky interaction with #2772 where if you are installing under VS Code stable the new insiders build thinks you meant you wanted stable and installs over itself back to stable. You can override this if you read #2772 (comment) and add the appropriate setting. (Because of this experience we are now thinking about how to fix it 😄 ). |
@brettcannon Nice job! I did it, works fine. And I can now confirm that this insider update doesn't break anything. Everything works fine on my end, maybe a bit faster than usual. |
✅ validated on my MacBook and @luabud 's 🥔-ish Thinkpad, doesn't seem to incur any extra lagging. |
Performance
python
2019.5.18875
Linux x64 4.15.0-51-generic
1.35.0
Find more details here: https://github.com/Microsoft/vscode/wiki/Explain:-extension-causes-high-cpu-load
Here is the attached file `/home/.../ms-python.python-unresponsive.cpuprofile.txt`
The text was updated successfully, but these errors were encountered: