arcan1s/netctl-gui

netctl-gui plasmoid makes plasmashell cpu intensive

wllacer opened this issue · 11 comments

If I use the plasma5 widget with plasma-desktop 5.2 the process plasmashell starts eating constantly around 20% of the CPU in one core (if ksysguard is to be believed, cpu consumption of the process is like a wave in the range 50% max - 10% min of the core CPU, with -probably- a second core following the same trend).

I discovered this behavior was attached to the netgui plasmoid runing top -as it was the only subtask recurringly appearing), and confirmed it by uninstalling the plasmoid from the bottom panel -> plasmashell CPU usage went to 0% (and memory usage dropped more than 10%)
On my machine (with a quad core Q8200) is more an annoyance, but it can bust dual cores ...
the whole of netctl-gui AUR packages had been rebuild after installing plasma 5.2

If you need more info or that i run some test, pls. don't hesitate

thank you for the report!

could you please increase update interval (for example, to 10000) and check CPU loading again? It will help me to localize a problem.

// Unfortunately the latest version (IMO) would be marked as unstable since I don't tested it on real machine only VBox yet. I hope I will create push several optimization in the next release (at least it is planned). But I cannot provide any ETA atm (I plan to create the first release of another widget for the newest Plasma fisrt). Sorry for any inconvenience.

Simple clarification:

The core part is not changed, it works as it did (I plan to implement some refactoring in the future), just linked to new plasma libraries. The significant changes is a UI which was rewritten from clean C++ to QML (on which I have not had enough experience unfortunately).

hmm,

I have looked at my VM again and have found that plasmashell uses about 4% cpu (two cores configuration) and 5% ram (of 4G) by htop info.

Could you please run

DEBUG=yes plasmawindowed org.kde.plasma.netctl 2> netctl.log

wait about minutes and attach created log file?

I changed the update interval as you suggested. The CPU peaks still happen -more on this later- but in the remaining 9 seconds, plasmashell cpu usage zeroes.
Thus, it seems that, on my machine, the "transaction time" is somewhat longer than a second -the default polling time.
I played a bit with the config parms. I had the path for netctl-auto set, although i don't use it. When i deleted it; CPU peaks went from circa 50 % to a bit less than 40%, and the transaction time seems to have gone down also somewhat. This is just a qualitative feeling. I'll try to provide you with hard data ... but you'll have to wait a bit :-(

I just read your debug info, but where do i run it, konsole or krunner ?

(btw my previous post refers to default config)

The simplest way is to run command from any terminal (konsole to)

Evgeny, I hope i can send you tomorrow the log. Thanks for your patience

I should note that in your case widget configuration should not affect CPU/memory. The CPU usage peak in your case seems to be related to data update which comes from DataEngine (because it raises only through the update interval)

Hi Evgeniy
You'll find enclosed a debug session of the plasmoid (i didn't know how
to do it via GitHub)
I'll put there some aditional comments.
Regards
Werner

On Fri, Jan 30, 2015 at 12:32 AM, Evgeniy Alekseev <notifications@github.com

wrote:

(btw my previous post refers to default config)

The simplest way is to run command from any terminal (konsole to)


Reply to this email directly or view it on GitHub
#26 (comment).

Hi Evgeniy.
While I agree with you the culprit must be fundamentaly the dataengine, a part does come from the widget:
If you run it from the command line instead of the systemtray the performance penalty nearly halves.
Sorry, i just got notice that a near relative just died. I won't be available in a couple of days. Really sorry

Hi Werner,
You may upload log to http://pastebin.com/ for example, or to https://gist.github.com/. Also you may copy it to message and paste in the following construction (just remove backslashes):

\```
log message
\```

My condolences. Do not worry about possible answer delays.

some fixes should be applied in the 1.4.1 (will be released soon). But I will look on possible improvements (e.g. decrease external command using) in the future.

But at the moment I've closed the issue.