0

I am using Manjaro on a Mibook and installed Code OSS (Visual Studio Code) on it and while it works, I see that the CPU jumps to 3.1GHz turbospeeds even while just writing stuff in the IDE.

If I change the governor to powersave it stays at around 1GHz but lags badly.

The reason I wanted to stay at 1GHz or below is battery duration and heat. This notebook gets pretty hot when on turbospeeds, even underclocked and only 1 core active (with hyperthreading it has virtually 2).

I know that Code OSS aka VSC is made in Electron and due to that pretty resource intensive, but I didn't knew that it was that bad.

Is there any way to improve this IDE, or maybe even enabling/disabling certain flags that make it run better when not on turbospeeds?

If not, is there any good alternative around that doesn't rely on Electron and similar technologies?

1
  • The thing is called "Code OSS", not "OSS" (OSS is for "open source software"; "Code OSS" is the project name for the non-microsoftified "VS Code"). If you want to abbreviate it, you could call it "Code", but not "OSS". Fixed that for you! Mar 6, 2022 at 11:40

1 Answer 1

0

I know that Code OSS aka VSC is made in Electron and due to that pretty resource intensive, but I didn't knew that it was that bad.

It's not the fact that it's electron, it's the fact that it does code analysis, compilation steps, symbol bookkeeping in the background while you type. My emacs and vim setups also use arbitrary amounts of CPU cores when I edit C++ from large projects – because having a backend that knows millions of symbols and understands what I'm doing while I'm typing simply requires basically a compiler with extra smarts to run in the background on every keystroke. Note, especially, that my emacs uses LSP/clangd, the exact same technology as VS Code / Code OSS uses to offer the same functionality.

Is there any way to improve this IDE, or maybe even enabling/disabling certain flags that make it run better when not on turbospeeds?

I'm sure you can disable features, e.g. by simply uninstalling the things it needs to do the analysis in the background. What these are depends on the actual language plugin you're using!

You'd actually just start your Code and run perf top -a next to it, to see where all the CPU cycles are spent to figure out what you can disable. This is an example of what you can disable. You're trading helpful functionality for CPU cycles, is all that you need to be aware of.

I wanted to stay at 1GHz

vs

at around 1GHz but lags badly.

Well you either can have performance or you can have low speeds...

only 1 core active

Terrible idea: hyperthreading makes the whole system more power-efficient by using the CPU more efficiently (the idea is that most of the elements of a single-threaded CPU are idle, still using a bit of energy, and just adding a little more logic allows them to be useful more often), allowing it to go back to idling and even scaling down clock frequencies earlier.

If not, is there any good alternative around that doesn't rely on Electron and similar technologies?

Again, Electron is not the problem.

I'm sure there's no better way to start a flamewar than to ask for IDE recommendations! So, really, you don't seem to want the advanced features the language plugins for Code offer. Then, a simple auto-formatting and syntax highlighting text editor might be better for you. Try Kate, or even Code::Blocks without the advanced completion/code spell checking/… features enabled.

1
  • Thank you for the tips and recommendations! Will try those out. And for hypertreading I might have worded the things a bit strangely. I'm using two cores (which is 1 physical core) having HT on. So I'm using 1 physical core to its maximum and the other one is disabled inside the UEFI BIOS.
    – Fusseldieb
    Mar 6, 2022 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .