Skip to content

keypirinha is eating my cpu #48

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

Closed
viollinn opened this issue Apr 21, 2016 · 15 comments
Closed

keypirinha is eating my cpu #48

viollinn opened this issue Apr 21, 2016 · 15 comments
Labels
Milestone

Comments

@viollinn
Copy link

Hi,

I soon as keypirinha is launched, my cpu is used at 25% by it.
keypirinha

I've waited a bit to make sure the "items in catalog" was not growing (and it's not).

regards...

@egabrum
Copy link

egabrum commented Apr 21, 2016

I haven't seen a CPU load that high yet (I haven't checked until now).
However, while rebuilding my ~10,000 item catalog, I see KP 2.5.1 taking up to 13% of my CPU power.
Launchy, updating its ~36,000 item catalog takes no more than 3% of my CPU

@polyvertex
Copy link
Member

polyvertex commented Apr 22, 2016

@kam3ha KP requests its plugins to build Catalog at startup so you're likely to observe activity during that time. Now, the CPU load and the amount of time needed to fully build the Catalog depends on what's being referenced in your configuration files.

Usual suspect is the ** wildcard not being used reasonably in the configuration of the Apps package (i.e. you ask the plugin to reference more than what you actually need/want). It may not be the case for you but then you'll have to share more details about your whole config. But if that's the case, note that for now and as far as the Apps package is concerned, the Catalog "grows" only once the plugin has committed its items: in the end of the scan.

@nerotic
Copy link

nerotic commented Apr 22, 2016

I have the exact same issue and I've made no changes to my config files other than this:

[app]
launch_at_startup = yes
hotkey_run = Ctrl+Tab

[gui]
always_on_top = yes

It doesn't ramp up to 25%...it stays there until the app is closed...days even.

@polyvertex
Copy link
Member

@nerotic you haven't changed the configuration of any package?

@nerotic
Copy link

nerotic commented Apr 22, 2016

Only the aforementioned.

@polyvertex
Copy link
Member

polyvertex commented Apr 22, 2016

@kam3ha and @nerotic:

  1. What's your version of Windows?
  2. Is the k systray icon green when problem occurs?
  3. Any WARNING or ERROR message in the logs (console)?
  4. I would appreciate you perform the following tests on the same machine and report your results. I cannot reproduce the problem so the goal is to narrow down the number of possible sources:

Apply the following config:

[app]
ignored_packages = apps

Then restart KP.
Check if problem still occurs.
If it still does, apply the following config and restart:

[app]
ignored_packages = apps, bookmarks, calc, controlpanel, everything, filezilla, putty, taskswitcher, test, url, websearch, winamp, winscp

And check again.
If the problem is still here, please report by copy&pasting your config.
Otherwise, try to re-enable the packages one by one until you reproduced the issue. You do not need to restart between each test on this one but wait a few seconds before going to next step.

Sorry for the annoyance but I'm blind here.

@nerotic
Copy link

nerotic commented Apr 22, 2016

Win 10 Pro Build 10586

Yes

05:03:30.075 Keypirinha 2.5.2 (6e65312) for x64
05:03:30.184 System: WinNT-x64 10.0.10586-ws-0x0100
05:03:30.184 Portable mode.
05:03:30.184 Official packages:
F:\Completed\Progs\Keypirinha\default\Packages
05:03:30.184 Profile dir: F:\Completed\Progs\Keypirinha\portable\Profile
05:03:30.184 Local dir: F:\Completed\Progs\Keypirinha\portable\Local
05:03:30.184 Monitor #1: Name[.\DISPLAY4] Rect[0, 0, 2560, 1440]
DpiScale[1.00] PRIMARY
05:03:30.184 Monitor #2: Name[.\DISPLAY5] Rect[2560, 0, 4160, 1200]
DpiScale[1.00]
05:03:30.215 Python 3.5.1 (default, Jan 1 2016, 11:43:57) [MSC v.1800 64
bit (AMD64)]
05:03:31.090 Loaded 195 items from history file.
05:03:31.122 Init done in 2.6920s, including 0.7651s (28%) for the Python
interpreter.
05:03:31.122 Plugin loaded: Internal.About
05:03:31.137 Plugin loaded: Apps.Apps (instance #1)
05:03:31.325 Plugin loaded: Bookmarks.Bookmarks (instance #1)
05:03:31.325 Plugin loaded: Calc.Calc (instance #1)
05:03:31.325 Plugin loaded: ControlPanel.ControlPanel (instance #1)
05:03:31.340 Plugin loaded: Everything.Everything (instance #1)
05:03:31.590 Plugin loaded: FileZilla.FileZilla (instance #1)
05:03:31.590 Plugin loaded: PuTTY.PuTTY (instance #1)
05:03:31.590 Plugin loaded: TaskSwitcher.TaskSwitcher (instance #1)
05:03:31.590 Plugin loaded: URL.URL (instance #1)
05:03:31.590 Plugin loaded: WebSearch.WebSearch (instance #1)
05:03:31.590 Plugin loaded: Winamp.Winamp (instance #1)
05:03:31.590 Plugin loaded: WinSCP.WinSCP (instance #1)
05:03:33.971 Apps.Apps: Cataloged 3237 items in 1.3 seconds
05:03:35.056 WARNING: Bookmarks.Bookmarks: Failed to read Firefox's
profiles file "C:\Users\nero\AppData\Roaming\Mozilla\Firefox\profiles.ini".
Error: File contains no section headers.
file: 'C:\Users\nero\AppData\Roaming\Mozilla\Firefox\profiles.ini',
line: 1
'\udcff\udcfe[\x00G\x00e\x00n\x00e\x00r\x00a\x00l\x00]\x00\n'
05:03:35.520 Bookmarks.Bookmarks: Referenced 3376 bookmarks
12:38:23.140 Received TaskbarCreated system message

2nd test, icon is no longer green and CPU is normal.

@polyvertex
Copy link
Member

polyvertex commented Apr 22, 2016

@nerotic Have you tried to re-enable packages one by one after the 2nd test so we know the culprit? BTW I opened #51 according to the WARNING you've got from the Bookmarks package.

@nerotic
Copy link

nerotic commented Apr 22, 2016

I'll check a bit later on today.

@viollinn
Copy link
Author

Hi,

Here is my configuration:

[app]
launch_at_startup = yes
hotkey_run = Ctrl+Space

[gui]
hide_on_focus_lost = yes
max_height = 6
compact_results = no

1 - I'm using Win 7 x64
2 - Yes
3 - I do have WARNINGS
16:20:22.376 Keypirinha 2.5.2 (6e65312) for x64
16:20:22.377 System: WinNT-x64 6.1.7601-ws-0x0100 SP1.0
16:20:22.379 Portable mode.
16:20:22.380 Official packages: C:\dev\bin\keypirinha\default\Packages
16:20:22.381 Profile dir: C:\dev\bin\keypirinha\portable\Profile
16:20:22.382 Local dir: C:\dev\bin\keypirinha\portable\Local
16:20:22.384 Monitor #1: Name[.\DISPLAY1] Rect[0, 0, 1920, 1080] DpiScale[1.25] PRIMARY
16:20:22.541 Python 3.5.1 (default, Jan 1 2016, 11:43:57) [MSC v.1800 64 bit (AMD64)]
16:20:23.487 Loaded 1 item from history file.
16:20:23.561 Init done in 1.2451s, including 0.9113s (73%) for the Python interpreter.
16:20:23.562 Plugin loaded: Internal.About
16:20:23.706 Plugin loaded: Bookmarks.Bookmarks (instance #1)
16:20:23.720 Plugin loaded: Calc.Calc (instance #1)
16:20:23.726 Plugin loaded: ControlPanel.ControlPanel (instance #1)
16:20:23.743 Plugin loaded: Everything.Everything (instance #1)
16:20:23.775 Plugin loaded: FileZilla.FileZilla (instance #1)
16:20:23.786 Plugin loaded: PuTTY.PuTTY (instance #1)
16:20:23.794 Plugin loaded: TaskSwitcher.TaskSwitcher (instance #1)
16:20:23.798 Plugin loaded: Test.Test (instance #1)
16:20:23.808 Plugin loaded: URL.URL (instance #1)
16:20:23.817 Plugin loaded: WebSearch.WebSearch (instance #1)
16:20:23.829 Plugin loaded: Winamp.Winamp (instance #1)
16:20:23.839 Plugin loaded: WinSCP.WinSCP (instance #1)
16:20:23.893 WARNING: Failed to scan "C:\Users\viollinn\AppData\Roaming\Microsoft\Windows\Start Menu\Programmes*" (code 5; level 1)!
16:20:23.894 WARNING: Failed to scan "C:\Users\viollinn\AppData\Roaming\Microsoft\Windows\Start Menu\Programmes*" (code 5; level 1)!
16:20:23.900 WARNING: Failed to scan "C:\ProgramData\Microsoft\Windows\Start Menu\Programmes*" (code 5; level 1)!
16:20:23.904 WARNING: Failed to scan "C:\ProgramData\Microsoft\Windows\Start Menu\Programmes*" (code 5; level 1)!
16:20:23.947 WARNING: Failed to scan "C:\Users\viollinn\AppData\Roaming\Microsoft\Windows\Start Menu\Programmes*" (code 5; level 1)!
16:20:23.947 WARNING: Failed to scan "C:\Users\viollinn\AppData\Roaming\Microsoft\Windows\Start Menu\Programmes*" (code 5; level 1)!
16:20:23.953 WARNING: Failed to scan "C:\ProgramData\Microsoft\Windows\Start Menu\Programmes*" (code 5; level 1)!
16:20:23.957 WARNING: Failed to scan "C:\ProgramData\Microsoft\Windows\Start Menu\Programmes*" (code 5; level 1)!
16:20:24.266 Bookmarks.Bookmarks: Referenced 333 bookmarks

I also tried to add "ignored_packages = apps" -> did not work

The tried "ignored_packages = apps, bookmarks, calc, controlpanel, everything, filezilla, putty, taskswitcher, test, url, websearch, winamp, winscp" -> No 25% CPU usage anymore, but K icon is now grey

I re-activate all the modules one by one and it seems like winscp is the source of the problem.

@polyvertex
Copy link
Member

polyvertex commented Apr 22, 2016

@kam3ha and @nerotic When you have some time, please upgrade to v2.5.3. There shouldn't be any difference but code is slightly safer at some strategic places and I'm still blind.

It seems @kam3ha has narrowed down the problem to the WinSCP package so, depending on your environment, the FileZilla and PuTTY package may lead to the same issue since they have pretty much the same working logic.

EDIT The green icon indicates plugin activity. So in the context of this issue, green is bad actually.

@nerotic
Copy link

nerotic commented Apr 22, 2016

Yep...can confirm that it's the winscp package.

@polyvertex
Copy link
Member

@kam3ha and @nerotic I've been able to reproduce the problem thanks to your feedback. A hotfix is on its way to be released in a few minutes. Thanks to both of you for taking the time to perform these tests.

@polyvertex polyvertex modified the milestone: v2.5.4 Apr 23, 2016
@polyvertex
Copy link
Member

v2.5.4 is out

@nerotic
Copy link

nerotic commented Apr 23, 2016

Working great for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants