-
Notifications
You must be signed in to change notification settings - Fork 39
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Periodic hangs editing JS/TS code on build 4180 #6473
Comments
Next time it happens please run |
After re-updating and using v4180 it took a day or two before the stalls got noticeable. I was watching closely when a stall happened today. I timed the stall at around 10 seconds. Process Explorer showed plugin_host-3.8.exe using all the CPU for the duration (slightly unusual compared to the usual where it's a
This list shows how much time each plugin has taken to respond to each event:
on_activated:
- Default.history_list: 0.545s total, mean: 0.000s, max: 0.003s
+ Default.history_list: 0.558s total, mean: 0.000s, max: 0.004s
- EditorConfig.EditorConfig: 0.342s total, mean: 0.000s, max: 0.024s
+ EditorConfig.EditorConfig: 0.351s total, mean: 0.000s, max: 0.024s
- SublimeLinter.active_linters_view: 0.053s total, mean: 0.000s, max: 0.008s
+ SublimeLinter.active_linters_view: 0.055s total, mean: 0.000s, max: 0.008s
- SublimeLinter.busy_indicator_view: 0.225s total, mean: 0.000s, max: 0.004s
+ SublimeLinter.busy_indicator_view: 0.228s total, mean: 0.000s, max: 0.004s
on_close:
Default.settings: 0.000s total, mean: 0.000s, max: 0.000s
- LSP.plugin.documents: 0.008s total, mean: 0.000s, max: 0.001s
+ LSP.plugin.documents: 0.009s total, mean: 0.000s, max: 0.001s
SublimeLinter.active_linters_view: 0.002s total, mean: 0.000s, max: 0.001s
SublimeLinter.highlight_view: 0.005s total, mean: 0.000s, max: 0.001s
- SublimeLinter.sublime_linter: 0.350s total, mean: 0.000s, max: 0.007s
+ SublimeLinter.sublime_linter: 0.359s total, mean: 0.000s, max: 0.007s
on_hover:
- Default.symbol: 0.011s total, mean: 0.000s, max: 0.001s
+ Default.symbol: 0.013s total, mean: 0.000s, max: 0.001s
- LSP.plugin.documents: 0.077s total, mean: 0.000s, max: 0.008s
+ LSP.plugin.documents: 0.079s total, mean: 0.000s, max: 0.008s
SublimeLinter.highlight_view: 0.013s total, mean: 0.000s, max: 0.001s
on_load:
- Default.exec: 0.253s total, mean: 0.000s, max: 0.017s
+ Default.exec: 0.259s total, mean: 0.000s, max: 0.017s
- EditorConfig.EditorConfig: 0.555s total, mean: 0.001s, max: 0.004s
+ EditorConfig.EditorConfig: 0.564s total, mean: 0.001s, max: 0.004s
LSP.boot: 0.007s total, mean: 0.000s, max: 0.001s
on_modified:
- Default.history_list: 1.746s total, mean: 0.000s, max: 0.056s
+ Default.history_list: 1.817s total, mean: 0.000s, max: 0.056s
Default.settings: 0.000s total
- SublimeClipboardHistory.jimblys_clipboard_history: 0.091s total, mean: 0.000s, max: 0.002s
+ SublimeClipboardHistory.jimblys_clipboard_history: 0.097s total, mean: 0.000s, max: 0.002s
- SublimeLinter.highlight_view: 6.254s total, mean: 0.000s, max: 0.491s
+ SublimeLinter.highlight_view: 6.449s total, mean: 0.000s, max: 0.491s
on_post_save:
- EditorConfig.EditorConfig: 0.057s total, mean: 0.000s, max: 0.010s
+ EditorConfig.EditorConfig: 0.058s total, mean: 0.000s, max: 0.010s
- Pretty JSON.PrettyJsonListeners: 0.009s total, mean: 0.000s, max: 0.001s
+ Pretty JSON.PrettyJsonListeners: 0.010s total, mean: 0.000s, max: 0.001s
on_post_text_command:
- Default.history_list: 0.766s total, mean: 0.000s, max: 0.008s
+ Default.history_list: 0.814s total, mean: 0.000s, max: 0.008s
- Default.paste_from_history: 0.385s total, mean: 0.000s, max: 0.006s
+ Default.paste_from_history: 0.404s total, mean: 0.000s, max: 0.006s
- LSP.plugin.documents: 0.406s total, mean: 0.000s, max: 0.002s
+ LSP.plugin.documents: 0.433s total, mean: 0.000s, max: 0.002s
on_post_window_command:
- LSP.boot: 0.100s total, mean: 0.000s, max: 0.002s
+ LSP.boot: 0.103s total, mean: 0.000s, max: 0.002s
- SublimeLinter.panel_view: 0.063s total, mean: 0.000s, max: 0.002s
+ SublimeLinter.panel_view: 0.064s total, mean: 0.000s, max: 0.002s
on_pre_close:
- Default.history_list: 0.119s total, mean: 0.000s, max: 0.003s
+ Default.history_list: 0.122s total, mean: 0.000s, max: 0.003s
Default.settings: 0.003s total, mean: 0.001s, max: 0.002s
- LSP.boot: 0.031s total, mean: 0.000s, max: 0.003s
+ LSP.boot: 0.044s total, mean: 0.000s, max: 0.010s
SublimeLinter.highlight_view: 0.006s total, mean: 0.000s, max: 0.001s
- SublimeLinter.panel_view: 0.017s total, mean: 0.000s, max: 0.002s
+ SublimeLinter.panel_view: 0.018s total, mean: 0.000s, max: 0.002s
on_pre_close_window:
LSP.boot: 0.001s total, mean: 0.000s, max: 0.001s
on_pre_move:
LSP.boot: 0.000s total
on_pre_save:
- EditorConfig.EditorConfig: 0.234s total, mean: 0.001s, max: 0.003s
+ EditorConfig.EditorConfig: 0.243s total, mean: 0.001s, max: 0.003s
- JsFormat.js_formatter: 0.039s total, mean: 0.000s, max: 0.002s
+ JsFormat.js_formatter: 0.040s total, mean: 0.000s, max: 0.002s
Pretty JSON.PrettyJsonListeners: 0.010s total, mean: 0.000s, max: 0.001s
on_query_completions:
- All Autocomplete.all_views_completions: 10.517s total, mean: 0.002s, max: 0.061s
+ All Autocomplete.all_views_completions: 11.039s total, mean: 0.002s, max: 0.061s
- CSS.css_completions: 0.233s total, mean: 0.000s, max: 0.006s
+ CSS.css_completions: 0.247s total, mean: 0.000s, max: 0.006s
- HTML.html_completions: 0.095s total, mean: 0.000s, max: 0.002s
+ HTML.html_completions: 0.103s total, mean: 0.000s, max: 0.002s
LSP.plugin.documents: 0.036s total, mean: 0.000s, max: 0.002s
on_query_context:
- Default.block: 0.158s total, mean: 0.000s, max: 0.015s
+ Default.block: 0.175s total, mean: 0.000s, max: 0.015s
- LSP.plugin.documents: 0.069s total, mean: 0.000s, max: 0.002s
+ LSP.plugin.documents: 0.072s total, mean: 0.000s, max: 0.002s
on_selection_modified:
- Default.history_list: 9.490s total, mean: 0.000s, max: 0.133s
+ Default.history_list: 9.941s total, mean: 0.000s, max: 0.133s
on_text_changed:
- LSP.plugin.documents: 2.272s total, mean: 0.000s, max: 0.035s
+ LSP.plugin.documents: 2.396s total, mean: 0.000s, max: 0.035s
on_text_command:
- Default.history_list: 2.706s total, mean: 0.000s, max: 0.011s
+ Default.history_list: 2.854s total, mean: 0.000s, max: 0.011s
- LSP.plugin.documents: 0.112s total, mean: 0.000s, max: 0.002s
+ LSP.plugin.documents: 0.123s total, mean: 0.000s, max: 0.002s
- SublimeLinter.highlight_view: 0.086s total, mean: 0.000s, max: 0.002s
+ SublimeLinter.highlight_view: 0.093s total, mean: 0.000s, max: 0.002s
on_window_command:
- Default.history_list: 3.588s total, mean: 0.000s, max: 0.165s
+ Default.history_list: 3.789s total, mean: 0.000s, max: 0.165s
Since it took a while of running Sublime before I noticed a big stall, feels like a garbage collection stall or something like that - I'll report back if the stalls keep getting longer over the next couple days, I guess =). Looking at the running processes, plugin_host-3.8.exe is taking 8.7GB of memory, which seems odd, so, that also tracks - perhaps a memory leak (and related garbage collection stalls, or even page file swapping). |
Another day, another big stall... 22 seconds this time, plugin_host-3.8.exe is up to 10.5GB. Again no significant change in |
Good thing it's the 3.8 process, since that's got more profiling tools. Memory usage is easiest, if you open the console and enter
For the CPU time we can try |
First stall of the day, 29s, memory usage has gone up from 10.8gb when I started tracing to 11.9gb now. Output of the above script is:
Nothing too huge, though quite possibly a leak (and I'd be happy to file a bug with LSP about it after we figure out why only the new Sublime is severely impacted by such a leak). Stumbling with Python, I wrote this to try to get the total:
Assuming it's correct, prints a total of Unfortunately doing a CPU profile seems unlikely to catch it in a timely fashion (happens only once every couple hours, although as the memory usage gets higher it gets more frequent, it seems ^_^) - I'll see if I can capture an hour with a stall and an hour without or something and see if that helps. If my hunch that it's related to a garbage collection stall is correct (or, any other stall related to the high memory usage), then the big question is why this only affects the new version of Sublime - either the memory isn't leaking in the old version (should be easy to prove/disprove by rolling back and checking memory usage after a while), or the plugin_host is not stalling during garbage collects on the old version, or the old Sublime front-end was not hanging when the plugin_host was stalling. |
Another morning, another stall... stall was around 52 seconds. I had The summary is:
After about an hour of (probably heavier) use and no stall, it displayed:
Definitely seems like the 52 seconds of max'd out CPU usage is not included in the profiler results (which, just making guesses from my experience with other garbage collected language's profilers, as they appear to include only user code and not system things like the garbage collector, seems to again point towards a large GC event/stall) - is there anything like the |
typescript language server is known to provide insane amount of completions which LSP package doesn't cut or limit by any means. Each completion needs to be wrapped into a With the information provided this issue is basically a duplicate of #6249. |
Though that might be true, this does not cause Sublime v4169 to stall the UI, and it does cause the new Sublime v4180 to stall the UI, that seems like a major regression/issue. Having completions delayed is expected / the usual / what I expect from LSP, though mildly inconvenient, having my keystrokes blocked for nearly a minute is not expected. |
I took a look at #6249 and tried it here, and the behavior seems to distinctly different - it's slow on both v4169 and v4180 equally. Though definitely could be related, they appear to be different bugs. #6249 seems caused by number of completions active in the moment of doing completions, this issue I'm seeing appears to rear its head at any time (the latest stall I was simply navigating the cursor around, no (visible) completions going on) and seems correlated to high memory use in the plugin_host process. |
Description of the bug
Since switching to v4180 I periodically get hangs (all Sublime windows completely unresponsive) of around 30s when editing code. Rolling back to build 4169 makes the problem go away.
Unfortunately, that's not a lot to go on, however this is a pretty major issue so I'm happy to provide any information or do any diagnosis requested the next time the hang happens. If other people experiencing this can chime in to help narrow down what may be the cause, that'd be helpful as well, I'd suspect!
The potentially relevant details as I've encountered this:
.ts
and.js
files (possibly only.ts
files, I'll keep an eye on this going forward, but I'm in .ts files about 95% of the time so it's hard to say for sure)LSP, LSP-typescript, SublimeLinter, SublimeLinter-eslint
Steps to reproduce
Code all day.
Expected behavior
Smooth sailing.
Actual behavior
Editor hangs.
Sublime Text build number
4180
Operating system & version
Windows 11 23H2
(Linux) Desktop environment and/or window manager
No response
Additional information
No response
OpenGL context information
No response
The text was updated successfully, but these errors were encountered: