-
Notifications
You must be signed in to change notification settings - Fork 659
🐛VSCode extension stuck at 100% cpu usage #4184
Comments
@Conaclos @ematipico this is becoming a real pain to deal with, it's really hampering our continued ability to use this. latest Rome rage attached
|
sorry #4220 may cause this problem, @Conaclos @ematipico could you revert that once? |
@unvalley This seems unlikely to cause the issue. The last nightly was released two weeks ago. Why do you think it is caused by this rule? |
@Conaclos oh sorry, I thought it was the latest version of the commit. |
Hi @jpike88 , We need your help to triage this issue. You would need to find a way to reproduce the issue consistently. This issue might be around some code/file. When you see that the Rome process goes crazy, you would need to give us the logs of the LSP server, preferably around the time the issue occurred. And the output trace in the VSCode extension. You would need to give us the configuration you're using. Sorry for the request, this is what we need from you to help. If you're able to create a repository, that would be awesome! Thank you |
is there a way I can just run it with some sort of profiling enabled and have the logs dump as they happen? I wouldn't have the slightest clue how to reproduce it, it tends to happen once I've been working for a while and I have a monorepo with a few TS project scattered throughout it, I work in the one vscode workspace. |
We don't have any profiling for now. Thing is, this might be a combination of project/files/code/LSP, so it's really difficult for us help you, unless there's a deterministic way to understand the root of the issue. You can navigate the logs of the LSP server: https://rustdocs.rome.tools/rome_cli/index.html#logs |
Ok good news, I can get it to stall on a particular file I have. But Rome and Rome Trace panels in VSCode tell me nothing. What next? |
More useful info: if I run |
OK so looks like it was't one file in particular, it just decides at some arbitrary point to start playing up. Rome output terminal says nothing:
and Rome Trace is empty. But definitely only a problem limited to VSCode and not the CLI tool. |
This is wrong, turns out it occurs on particaruly sensitive files. Whatever it's doing seems to be dependent on the file I'm trying to save. But paste this file is either Rome tools playground, or trying via CLI works fine. |
Great, we have some info. It could be that documents are not synchronized anymore, of your VSCode has some configuration that uses Rome (maybe organized imports?) Feel free to create a repo or provide the logs once you're able to replicate the issue. |
There are no logs, if there was anything worth providing I'd do it but as I said the log output for the Rome and Rome Trace outputs are practically empty. What Rome needs is a proper debug mode that can spit out enough debug messages that it's useful to begin with, or even better spit out some kind of profiler or stack analyser that would allow you to generate a flame graph or something like that. Otherwise would be exceptionally difficult for me to try and create a reproducible case with this as it isn't happening in a predicable pattern. |
Sorry I just realised I had to change trace to verbose in vscode settings for the extension. I'll see what it spits out |
I have a file isolated with the problem (kind of) but prefer to send it to you privately. Let me know the best way |
I'd like to investigate this issue since I'm trying to fix an utf encoding problem, maybe it can be relative. |
@denbezrukov I am happy to send you the file I mentioned privately, it's has a non-trivial amount of code in it |
I'm also able to freeze the Rome playground with my example as well |
@jpike88 Is it possible to send it on Discord? |
Sure, what's your username |
@jpike88 |
Since updating to latest nightly, I feel like this problem might be getting worse since it's happening on a file I don't remember having problems with previously. It's becoming extremely frustrating to use the Rome extension and I'm considering just disabling it. Is there any progress on figuring this out? |
I'm still tackling problem with unicode. |
@jpike88 we're aware of the issue, there's no need to pressure. We're just a bunch of volunteers trying to make the best out of it. This behaviour is extremely unhelpful |
Oh? I thought Rome is funded? |
I don't mean to pressure. I appreciate the work you guys are doing, and will just bear with it. If I could code in Rust I would have contributed already especially to fixing this problem as it is quite acute. |
It was, yes. You can check discord for more info https://discord.com/channels/678763474494423051/678763474930761739/1068580995219083346 |
Oh wow I didn't know! I'm sorry to hear about it. Despite the situation I'm sticking with it, even with the current issues it's still a breath of fresh air to eslint, I could never go back. I'm certain you guys will find a continuing uptake of both funding and contributors in the meantime, don't lose hope, it's too good to ignore. I'm both happy it's in rust to maximise performance, not so happy I can't just jump in to make contributions so fast! Maybe it's time to brush up on some Rust... |
Potentially #4308 could fix the problem. |
great, ill jump on next nightly as soon as it's out to confirm |
Just tried on |
Could you please record a video and send it to me on Discord🙏🏼 |
done |
Just an update, @denbezrukov was able to reproduce my problem with the sample code I sent. Will be interesting to see what the cause was! |
What is the status of this? I currently experience this on a few of the files in the project I'm working on. Hope some of my findings will be helpful 🙂 |
@KaHLK thank you very much for the information, that definitely helps a lot! The main problem is reproducing the issue. If there's a way to create a minimal repo, that will help to debug! Without that, it's really difficult to understand the issue. |
Environment information
What happened?
After working for a while, saving a file gets stuck and these kinds of messages appear, spinning indefinitely:
If I look at how Rome is doing in the activity monitor, it's stuck spinning at 100% like so:
Seems like there's an infinite loop issue happening? Not sure what else it could be.
If I just dismiss the dialogs, I notice that the Rome process continues to be maxed out, looks like it's stuck. Only way to stop is either close vscode or kill the process directly.
Expected result
Rome not cause CPU to max out at 100% forever!
Code of Conduct
The text was updated successfully, but these errors were encountered: