I have been experiencing high (124%) CPU usage of node whenever I start Theia and my connection is not stable in the browser as well. The connection keeps going in and out when start the browser app

[original thread by esubah1989]

Are there any interesting traces, either from the back-end or in the browser’s console? Do you know if the high CPU usage in the B-E happens also without connected client(s)? A quick way to make sure you have no connected client (e.g. web browser tab forgotten somewhere) is to re-start the B-E using a different port.

[esubah1989]

The application runs slow in the browser but no trace of any error. I’m using Mac by the way. Most of my friends are using Mac and theirs don’t run slowly. I have trie on different ports and it’s the same.

[esubah1989]

[esubah1989]

This bar be alternating between blue and yellow as shown in the picture.

When you used a different port, did you notice the high CPU load immediately, or only after a client connected?

[esubah1989]

Only after a client is connected.

ok, thanks for the info. Did you notice if the problem happens in only one or multiple different workspaces? If you close the workspace, does the CPU usage go down?

I assume you are using the plain vanilla “example browser” application? How did you build it? If from source, try a “git clean -fdx” and re-build. In some rares cases, starting from a fresh clone has sometimes resolved strange issues.

@esuba Could you reproduce it on the stable connection by multiple refereshes of the browser? Could be garbage collection issue. One has to profile it.

[esubah1989]

@marc-dumais It happens regardless of the number of workspace open or no workspace open. I created my own extension, that’s what I’m running.

[esubah1989]

@anton-kosyakov On a stable connection, it goes down really low. On an
unstable connection, it goes up.

https://github.com/theia-ide/theia/issues/4434 could be