WindowTop / WindowTop-App

Set window on top, make it dark, transparent and more
Other
1.1k stars 70 forks source link

Continuous CPU usage #331

Open sebastienbo opened 9 months ago

sebastienbo commented 9 months ago

Hi,

I think there is something wrong with the latest updates. WindowTop is continuously using 2-5% cpu, which is high for being continuous. For the same reason I noticed that it is in my top 10 most battery using apps. Is it possible to check what could be wrong? Maybe something is polling or updating too much or too fast? Or maybe the antivirus from windows Defender? ('i have no clues that it acctually has something to do with it, but i don't have another anti virus)

I'm running the latest windows 11 23H2, ontop Ver 5.22.5

image

The interesting thing is that I don't have any pinned (ontop) windows at this moment. I did even untop and unpip all windows. So it must be the anchors (configured at 3 right now). And when i disable everything even anchors, it fluctuates between 1 and 2,5%, which is high for something that does nothing.

gileli121 commented 8 months ago

Hello, thank you for the report. I will check it. Do you remember the last version that worked properly? Was it 5.21? Or some minor version under 5.22?

sebastienbo commented 8 months ago

I have no idea, I was just noticing that my laptop battery was always empty so fast, so I checked which app used the most CPU time, and window top was in the top 3

On Tue, 21 Nov 2023, 21:29 Gil Eliyahu, @.***> wrote:

Hello, thank you for the report. I will check it. Do you remember the last version that worked properly? Was it 5.21? Or some minor version under 5.22?

— Reply to this email directly, view it on GitHub https://github.com/WindowTop/WindowTop-App/issues/331#issuecomment-1821630728, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7MPQVRTCU7DL2CTFAQ7O3YFUFJRAVCNFSM6AAAAAA7SOLIHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRRGYZTANZSHA . You are receiving this because you authored the thread.Message ID: @.***>

gileli121 commented 8 months ago

@sebastienbo

I tested it on my computer in an idle state - nothing on top, anchors disabled. I don't see any difference. If there is a difference, it is probably 0.1% on my computer. Usually, it takes between 0.1%-0.4% on my end.

I was looking at your screenshot and noticed this: image

According to the task manager, you have two processes of WindowTop.exe instead of one. This can happen only when the Windowtop is not running as admin (elevated), and you try to use it on the elevated window and approve the request to get elevated privileges to control the window. When it happens, WindowTop starts a second WindowTop.exe process with admin privileges (once you confirm it).

Then, the task manager shows the CPU usage of the two WindowTop running processes.

This (having two WindowTop processes) only happens when you first start WindowTop. It occurs only after you try to do something (like enable always-on-top) on an elevated window (the task manager is an example of an elevated window).

If you start WindowTop again, you will see less CPU usage because it is one process.

This behavior is not new; you probably did not do it before.

This can explain it.

But, I may be wrong in my assumption that (2) means two WindowTop processes. To confirm that this is the case, next time you see high CPU usage you can check it on the detials tab image If you see two WindowTop processes and different PIDs, it means that this is the case.

gileli121 commented 8 months ago

@sebastienbo

To quickly rule out the possibility that it is related to one of the updates, please try returning to two major versions before - installing 5.20.2 from here. Release WindowTop v5.20.2 · WindowTop/WindowTop-App (github.com)

I assume that two previous major versions are good enough to rule out this option.

Once installed, try to see if you experience the CPU problem again.