Skip to content
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

CPU usage #360

Closed
veikolippand opened this issue Feb 27, 2022 · 1 comment
Closed

CPU usage #360

veikolippand opened this issue Feb 27, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists question Further information is requested

Comments

@veikolippand
Copy link

I noticed that Vieb is bit too active when i at least expect no activity at all. When i open only one tab with some static content for example Vieb help page then CPU usage is way higher than it should be in my opinion.
It might be something caused by electron or chromium and can not be changed but it is a bit annoying.
So is there any clear explanation for this, is it underlying framework or can it be improved from Vieb side?

Currently one tab opened with this github page and top is showing following.

top - 09:54:42 up 22 min,  1 user,  load average: 1.60, 1.38, 1.00
Tasks: 176 total,   2 running, 174 sleeping,   0 stopped,   0 zombie
%Cpu0  :  46.2/0.0    46[||||||||||||||||||||||||||||||||||||||||||                                                 ]
%Cpu1  :   2.0/0.0     2[||                                                                                         ]
%Cpu2  :  33.7/0.5    34[|||||||||||||||||||||||||||||||                                                            ]
%Cpu3  :   1.3/0.7     2[||                                                                                         ]
MiB Mem :  15949.0 total,  14104.9 free,    747.1 used,   1097.0 buff/cache
MiB Swap:  16323.0 total,  16323.0 free,      0.0 used.  14829.3 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1455 veiko     20   0   12164   6804   5084 S   0.0   0.0   0:00.06      `- zsh
   1483 veiko     20   0    2420   1576   1472 S   0.0   0.0   0:00.00          `- startx
   1505 veiko     20   0    6052   1004    848 S   0.0   0.0   0:00.00              `- xinit
   1521 veiko     20   0    7252   2388   2140 S   0.0   0.0   0:00.09                  `- bspwm
   1525 veiko     20   0    7068   2216   1892 S   0.0   0.0   0:00.10                      `- sxhkd
   1538 veiko     20   0  247696  11840   8688 S   0.0   0.1   0:00.04                      `- dunst
   1542 veiko     20   0    6168   2832   2560 S   0.0   0.0   0:00.57                      `- xautolock
   1433 veiko     20   0   15396   8800   7300 S   0.0   0.1   0:00.10  `- systemd
   1434 veiko     20   0  167520   3352     24 S   0.0   0.0   0:00.00      `- (sd-pam)
   1453 veiko     20   0  880824  56888  37228 S   0.0   0.3   0:02.58      `- mpd
   1454 veiko      9 -11 1044232  31516  22112 S   0.0   0.2   0:00.69      `- pulseaudio
   1466 veiko     20   0    9988   4988   4444 S   0.0   0.0   0:00.00      `- dbus-daemon
   1529 veiko     20   0  237304   7020   6068 S   0.0   0.0   0:00.00  `- gnome-keyring-d
   1600 veiko     20   0   80092  23456  12084 S   0.3   0.1   0:04.82  `- compton
   1606 veiko     20   0 1194256  27896  21172 S   0.3   0.2   0:05.16  `- polybar
   1669 veiko     20   0   20.5g 175728 120096 S   0.0   1.1   0:34.91  `- vieb
   1672 veiko     20   0   16.2g  46276  38044 S   0.0   0.3   0:00.02      `- vieb
   1696 veiko     20   0   16.4g 166096  88728 S   0.7   1.0   0:34.27          `- vieb
   1752 veiko     20   0   16.3g  23376   6124 S   0.0   0.1   0:00.00              `- vieb
   1673 veiko     20   0   16.2g  46340  38108 S   0.0   0.3   0:00.01      `- vieb
   1675 veiko     20   0   16.2g  12300   4004 S   0.0   0.1   0:00.00          `- vieb
   1711 veiko     20   0   24.3g  78952  63900 S   0.0   0.5   0:00.07              `- vieb
   1712 veiko     20   0   24.3g  78584  63732 S   0.0   0.5   0:00.07              `- vieb
   1702 veiko     20   0   16.3g  71456  58768 S   0.0   0.4   0:01.68      `- vieb
   1704 veiko     20   0   24.3g 146832 107004 S   0.3   0.9   0:33.92      `- vieb
   1892 veiko     20   0   28.3g 152136 112048 S   0.0   0.9   0:42.77      `- vieb
   2144 veiko     20   0   24.3g 187272 114140 R  49.7   1.1   8:23.01      `- vieb
   1826 veiko     20   0   39036  23884  11772 S   0.0   0.1   0:00.47  `- xst
   1827 veiko     20   0   12168   6716   4996 S   0.0   0.0   0:00.03      `- zsh
   1836 veiko     20   0   12460   5216   4000 R   0.3   0.0   0:03.49          `- top

In current session Vieb is most active process and IMHO little too active. And there is so many threads as well which makes me wonder what they all are doing? :)
I don't know much about web browsers internals and necessary processes to render page from html but world sucks if all this resource usage is necessary to be a usable small web browser.

@veikolippand veikolippand added the question Further information is requested label Feb 27, 2022
@Jelmerro Jelmerro added the duplicate This issue or pull request already exists label Feb 27, 2022
@Jelmerro
Copy link
Owner

The amount of processes and is controlled by chromium/electron, this is not directly controlled by Vieb. As for the cpu usage, that is caused by the #179 workaround, because we can't run scripts in iframes on load with electron, we have to use a timer to do so currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants