-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Code hints: CPU stays at 100% with specific project, may eventually crash #7245
Comments
If I delete roughly the bottom half of Are we filtering out large files from Tern? It seems like anything over 100-200 KB is a safe bet that it's a minified library or build artifact that should be ignored... |
...and deleting the bottom half of app.js (from line 9731) gets it to level off at ~840 MB |
According to https://github.com/adobe/brackets/wiki/JavaScript-Code-Hints:
This is probably a conservative value, feel free to change it yourself in a |
@peterflynn I'm pretty sure it's not just a matter of it being "too much code to handle". These cases seem to often be edge cases for Tern's inference. This is probably not a narrow enough case for Marijn to troubleshoot, though. Minified files aren't so good for code completion anyhow. I wonder if there's a way that we could detect a case like this, prompt the user and then save a file exclusion? |
Nominating for 1.0 -- I'm not of the view that Brackets has to magically just work in project with 200 MB of JS code, or 100,000 files, etc., but (a) this project wasn't really that big, and (b) we should fail a little more elegantly than just crashing. (Same goes for #7262 - not sure whether to dupe that to something else yet or not) |
@peterflynn @dangoor Is anyone still seeing this one? Using Peter Flynn's gist UPDATE: OK, I'm seeing same behavior on Mac as Win now. Brackets UI is functional and responsive during this time, so it doesn't seem bad. |
@redmunds This is the kind of case for which the new timeout in Tern should be handy. Marijn would like reproducible cases, but to stop the pain today just being able to disable hints for problematic files will help. |
This issue is fixed in master (you get a popup warning you about problem files and exclusions are automatically added for those files). I was able to successfully get hints for app.js, though it's possible that even that file will fail for some people because it's so large. Note that I just filed #8750 because it appeared that I needed to reopen the project after the exclusions were added in order for hinting to work. FBNC to @peterflynn |
This was fixed in 0.43 so changed Milestone. |
This code is derived from the following project: https://github.com/etrepum/platformer-melon-js -- if you clone that and do a grunt build, you'll also hit the bug. The testcase here is simplified.
melonJS-0.9.11.js
Result:
One CPU core goes to 100%, and Brackets memory usage climbs continuously. (Sometimes it seems to level off around 800-900 MB even though CPU remains at 100% afterward; other times memory usage keeps climbing until it crashes).
If any one of the 4 files is removed, Brackets tops out at about 400 MB of memory usage and CPU returns to normal afterward.
The text was updated successfully, but these errors were encountered: