You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Extension causes high cpu load" warnings from VS Code due to slow module loading #1628
I’m not even sure what I need to attach to my home directory even mean since it’s already attached to /Users/Ken or ~/ which is my home directory but nowhere else.
Note:
This was an auto generated issue posted to GitHub by VS Code upon receipt of “Error connecting to the service protocol: HttpException: , uri = http://127.0.0.1:1027/ws.” I’ve exhausted my option trying to fix this error going for almost a day now as follows:
@TUKenStone sorry, what I mean was there is a file at /Users/ken/Dart-Code.dart-code-unresponsive.cpuprofile.txt that VS Code created when it gave you this warning, and you are supposed to attach it to this GitHub issue. It's a CPU profile of the extension code, which will show what code was running when this happened.
Unfortunately I can't reproduce this issue (though my machine is very fast). I've had a few people raise it in the past, but none have ever attached the CPU profile, so I've never been able to investigate where the time is going.
If you can attach that file (which I believe VS Code has sanitized to ensure there is no personally identifiable info, pathnames, etc.) I can investigate. If you'd rather share it privately, you can email it to [email protected].
@TUKenStone Thanks! I got the trace, and it looks like the cause is that the extension has lots of files, and the loading and compiling of each is slow (this explains VS Code's push to have extensions bundle their JS recently).
I don't think this is related to the other issue you mentioned though ("Error connecting to the service protocol: HttpException: , uri = http://127.0.0.1:1027/ws"). Can you open another issue about that? We might need to move it to the Flutter repo, but we can do a little debugging first to get more info.
changed the title [-]Extension causes high cpu load[/-][+]"Extension causes high cpu load" warnings from VS Code due to slow module loading[/+]on Apr 18, 2019
I can repro this now - not the warning, but the poor performance at least. It seems to be related to loading dart_debug_protocol.ts and all its descendant require()s. There are calls to things like Module._resolveFilename which take > 250ms (because it goes and reads the JSON for the package). No wonder VS Code wants all the modules bundled. Looks like this will need to be revisited...
Activity
DanTup commentedon Apr 18, 2019
@TUKenStone are you able to attach the file mentioned in your message?
TUKenStone commentedon Apr 18, 2019
I’m not even sure what I need to attach to my home directory even mean since it’s already attached to /Users/Ken or ~/ which is my home directory but nowhere else.
Note:
This was an auto generated issue posted to GitHub by VS Code upon receipt of “Error connecting to the service protocol: HttpException: , uri = http://127.0.0.1:1027/ws.” I’ve exhausted my option trying to fix this error going for almost a day now as follows:
DanTup commentedon Apr 18, 2019
@TUKenStone sorry, what I mean was there is a file at
/Users/ken/Dart-Code.dart-code-unresponsive.cpuprofile.txtthat VS Code created when it gave you this warning, and you are supposed to attach it to this GitHub issue. It's a CPU profile of the extension code, which will show what code was running when this happened.Unfortunately I can't reproduce this issue (though my machine is very fast). I've had a few people raise it in the past, but none have ever attached the CPU profile, so I've never been able to investigate where the time is going.
If you can attach that file (which I believe VS Code has sanitized to ensure there is no personally identifiable info, pathnames, etc.) I can investigate. If you'd rather share it privately, you can email it to [email protected].
Thanks!
DanTup commentedon Apr 18, 2019
@TUKenStone Thanks! I got the trace, and it looks like the cause is that the extension has lots of files, and the loading and compiling of each is slow (this explains VS Code's push to have extensions bundle their JS recently).
I don't think this is related to the other issue you mentioned though ("Error connecting to the service protocol: HttpException: , uri = http://127.0.0.1:1027/ws"). Can you open another issue about that? We might need to move it to the Flutter repo, but we can do a little debugging first to get more info.
[-]Extension causes high cpu load[/-][+]"Extension causes high cpu load" warnings from VS Code due to slow module loading[/+]DanTup commentedon Apr 18, 2019
I can repro this now - not the warning, but the poor performance at least. It seems to be related to loading
dart_debug_protocol.tsand all its descendantrequire()s. There are calls to things likeModule._resolveFilenamewhich take > 250ms (because it goes and reads the JSON for the package). No wonder VS Code wants all the modules bundled. Looks like this will need to be revisited...DanTup commentedon Jun 6, 2019
Fixed by #1741.