Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

🐛 organizeImports saving in VSCode causes performance issue, CPU spinning #4757

Open
1 task done
jpike88 opened this issue Aug 7, 2023 · 6 comments
Open
1 task done
Labels
S-Needs info Status: the issue needs more info in order to be triaged

Comments

@jpike88
Copy link

jpike88 commented Aug 7, 2023

Environment information

CLI:
  Version:                      12.1.3
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  ROME_LOG_DIR:                 unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v16.14.2"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/8.5.0"

Rome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           true
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Rome servers...

Running Rome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What happened?

organiseImports works quickly via CLI but has major performance issues in VSCode if enabled on save, what seems like some kind of super inefficient or infinite loop with CPU maxed out endlessly.

Expected result

It should be fast

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@jpike88 jpike88 added the S-To triage Status: user report of a possible bug that needs to be triaged label Aug 7, 2023
@ematipico
Copy link
Contributor

@jpike88 could please create a reproduction? Without a way for us to replicate the issue, it's absolutely impossible to help you.

@ematipico ematipico added S-Needs info Status: the issue needs more info in order to be triaged and removed S-To triage Status: user report of a possible bug that needs to be triaged labels Aug 7, 2023
@jpike88
Copy link
Author

jpike88 commented Aug 7, 2023

rome.json.zip

also this may be useful (you need to re add the organize imports property on it though)

@jpike88
Copy link
Author

jpike88 commented Aug 8, 2023

Let me know when you have a window of time to recieve the file I'll comment with it

@ematipico
Copy link
Contributor

@jpike88 it's best to create a minimal repository with the code that triggers the issue.

@jpike88
Copy link
Author

jpike88 commented Aug 8, 2023

But the extension works on a file by file basis, wouldn't just giving a problem file do the job?

@jpike88
Copy link
Author

jpike88 commented Aug 8, 2023

ok fine ill do a minimal repo hold on

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-Needs info Status: the issue needs more info in order to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants