-
Notifications
You must be signed in to change notification settings - Fork 189
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
High CPU usage on macOS from the Renderer process #3219
Comments
This issue is not specific to macOS. |
Same here, still 1 year later. |
Compass still has this bug, very annoying. Anybody wants to debug this? |
Same here, high CPU usage, MacOS version 13.3.1. M1. |
Why isn't this fixed till now? Experiencing the same high CPU usage |
What kinds of percentages are you all seeing? Is it significantly different to slack or vscode's renderer processes? |
Slack, Discord, Teams, and two instances of vscode combined use less than compass alone on my machine. |
Hi @dumbasPL!
|
Occasional spikes on the renderer process are a normal thing and will happen in any electron app when there are changes being made. The problem is that there are no (visible) changes being made but both the
While connected yes. It's a constant ~9% or so for me. No matter what tab I'm on, even when connected to an empty database. While disconnected, it drops down to a near-perfect 0% on idle, just like any other electron app. So my guess is that there is maybe some sort of animation or some other thing that is constantly updating the DOM that's causing this. If you are actually interested in fixing this then I could profile it and figure out exactly what's causing this. |
Compass eats ~30% of CPU on Apple M1 Max even sitting in background. Starts eating CPU after some time, can be hours or days. |
My experience is very similar to @dumbasPL. Definitely higher CPU usage than the other big name Electron apps. Also agree that when not connected to a cluster the CPU usage is not an issue, but as soon as I make a connection the CPU usage on the I would expect the CPU to use a few extra resources while fetching and displaying a collection initially, but once the collection is in view I would think there is nothing to be done as it's not like the Compass UI "auto refreshes" or anything similar to that. I assume, once the data has been fetched, it's a static view that won't change until another button is pressed and shouldn't use many resources? |
I'm seeing this exactly on Linux (Fedora 38, 6.3.12-200.fc38.x86_64).
|
Still seeing this. Using between 10 and 25% cpu in the background. MacOS, Compass Version 1.40.4 |
An update on this one, we managed to isolate the issue and we will work on a fix soon. |
|
I still have the same issue, using a MacBook Air M2 |
@Anlele1701 by any chance do you see placeholders in your sidebar or anywhere else (see attached screenshot)? The original issue was related to the placeholders still animating after retrieving databases / collections list, just with visibility hidden and was fixed long time back. Its not that the placeholders won't be there ever but there are "uncommon" cases when Compass won't be able to fetch databases / collections and will continue to display those placeholders which will shoot up CPU usage on the render process. |
@himanshusinghs That explains it, thanks for replying! |
Bug Report
Current Behavior
I notice that Compass causes high CPU usage on my machine and it seems to stem from the Electron renderer process (see screenshot).
My machine is running a 2.6 GHz 6-Core Intel Core i7 and I wouldn't expect the Compass app to be averaging 15%-20% of the CPU when connected to a database.
Code/Gist
N/A
Expected Behavior/Code
Less CPU usage.
Environment
Compass: Version 1.32.2 (1.32.2)
OS: macOS Monterey 12.4
CPU: 2.6 GHz 6-Core Intel Core i7
Memory: 16 GB 2667 MHz DDR4
Possible Solution
I do notice the Electron version being used is v13 when v19 is available, which of course is not a guaranteed fix for the problem, but probably doesn't hurt seeing as v13 isn't supported/updated any more.
I also noticed some anecdotal data, which isn't exactly an "apples to apples" comparison, but I will include nonetheless. The high CPU usage seems to be when I connect to a MongoDB 4.4.11 Community instance with 8GB of data using a TLS certificate. When I connect to a MongoDB 5.0.9 Enterprise instance with 10MB of data without using a TLS certificate the CPU usage is about half (~8% usage).
So the differences between the comparison is MongoDB version, logical size or the TLS certificate.
From these I wonder if the use of a TLS certificate is causing the much higher CPU usage?
Additional Context/Screenshots
The text was updated successfully, but these errors were encountered: