-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Speed up Glances launch #1534
Comments
Glances 3.1.2 beta: Glances started in 3.214372 seconds Plugins start duration, total: 1.3 seconds (see detail below) Plugins start duration, detail:
glances_ip.py | 0.21727 Plugin | Update duration |
Sensors and folders are good candidates for optimization... |
Run Glances in debug mode (-d) and grep "duration" in the Glances log file. |
Not sure if Windows is at all a priority, but it is much, much slower to start up in Windows, and for some reason there's quite a delay when using keyboard shortcuts after it starts up. It took about 15 seconds to start up and about 6 seconds for it to register the 'q' for 'quit' command. |
@ImportTaste i think that there is an issue with one of the plugin. Can you please try to run Glances with the --disable-plugin sensors option. You can run and copy/paste the result of:
Thanks |
I emailed you the results using the contact email on your profile. |
Two plugins in your email take lot of time to process:
On my system, it takes:
Glances uses the PsUtil lib to get the processes and sensors stats. Something is wrong on your system with this lib. In order to confirm the behavor, can you run this command line on your system:
Result on my PC: 50 loops, best of 5: 8.77 msec per loop and this other one:
Result on my PC: 50 loops, best of 5: 55.02 msec per loop |
Yeah, I get: "1 loop, best of 5: 2.08 sec per loop"
Even when I use Python 3.8 instead of 3.10, it comes out to about the same. I guess this lib's use case is just very slow on Windows.
|
@ImportTaste Try to open an issue with the result of the previous command line on the PsUtil Github repository: https://github.com/giampaolo/psutil/issues Perhaps related to giampaolo/psutil#1967 ? |
With Glances 4.0.0 (beta version may 2023):
and without the container plugin:
|
That's quite the improvement, what turned out to be the main issue? And is the beta available anywhere, or is currently internal only? |
@nicolargo a large part of the duration for starting up the webUI seems to be loading the favicon.
|
@KaiStarkk the favicon is not downloaded from Internet but provided in the Glances package. Perhaps the issue came from your ad-blocker because it did not allow HTTP local trafic to the Favicon URL. |
It doesn't seem to be an adblock issue, same issue even with extensions
disabled.
API is working fine, issue only occurs when trying to load the WebUI
directly.
While trying to load the WebUI though, API requests get refused for about
10 seconds.
Not a major issue as I'm only using the API, but yeah strange.
… Message ID: ***@***.***>
|
Strange, can not reproduce on my side... What's your Glances version / Operating system ? |
Glances v3.4.0.3 with PsUtil v5.9.5 Systeminfo:
Let me know if any logging would be helpful. It's not a critical bug for me so no stress if it's low priority. |
Glances 4.0.0 (beta): Minimal (Glances started in 0.525292 seconds).
Full plugins (Glances started in 0.965322 seconds):
|
Description
Glances is slow to start.
Make some optimization in order to speed up it.
Versions
Logs
N/A
The text was updated successfully, but these errors were encountered: