-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
LSP should maybe ignore .json files by default #21409
Comments
Wondering if it would make sense to parse that file in rust, generate a simple definition file in rust and then hand it over to TSC. Looking at the JSON file the type would be: export default Array<[number, {
key: number,
value: {
id: number,
first: string,
last: string,
age: number
}
}]> |
The app repo is https://github.com/nhrones/BuenoCache Note: This is not a Deno project! |
This has happened once again with the same (unprotected) JSON file. VS Code OUT:
|
Heads up: {
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true,
"deno.disablePaths": ["./hundredk.json", "./.vscode"],
} If I actually open the file in VS Code, I get the OOM crash.
Note: I rarely open this file, It was auto generated to be used for DB testing. |
LSP-Crash-Test SEE: https://github.com/nhrones/LSP-test LSP OOM crash after about 3 minutes. Small two file test app, one being a large JSON data file.
|
JSON files already aren't preloaded by default unless they are imported, in which case their types need to be analysed. We determined this wasn't the cause for most users, just the isolated case linked here. Closing. |
Still getting OOM crash, even without any large files. Seems related to long edit sessions. This on a wimpy 8GIG mem Win11 laptop. I've learned to just expect it and simply restart VS Code. Error states something to the effect |
So that's not related to the JSON file, right? I think this particular issue isn't worth pursuing. |
Yes I agree. In my apps with large json files, I've been able to isolate this issue with your recommended fix {
"deno.enable": true,
"deno.disablePaths": ["./dist","./.vscode", "./data"],
} I only wanted to provide feedback that on my laptop, I'm still getting random LSP crash. I would agree that this issue should be closed. |
The above report wasn't related to JSON files |
User reports that using a 8.4Mb JSON file causes a slow down in the LSP. We should investigate how this file in used in the project (is it imported somewhere?) and figure out how to speed it up. Maybe we should disable analysis of JSON files altogether?
The text was updated successfully, but these errors were encountered: