Process Hacker Discussion Forum

 
Eran
Member
Posts: 24
Joined: 15 Mar 2015 16:30
OS: Windows 8.1 64bit

Idle on minimize

22 Jun 2015 17:25

I suggest adding an option to stop polling/refreshing while not visible (e.g. the application window is minimized). When the user restores the window the refresh cycle and event listening will re-start.

Currently it seems Process Hacker uses pretty much the same amount of resources when it's invisible as it does when it is visible. I use Process Hacker mostly for monitoring some processes, if I minimize the window and it keeps refreshing (even due I'm not going to see the information) it seems kind of wasteful. That's the main reason I'm not using the run at startup option currently.

Maybe some of the features (e.g. "System Information") need the constant refresh to be useful, so I'm not suggesting removing the current behavior, just adding an option to "Idle on minimize" for people that don't normally use the history features (if they know they need that, they can just leave it open in the background and not minimize).

What do you think?
 
User avatar
wj32
Founder
Posts: 948
Joined: 17 Jan 2011 05:19
OS: Windows
Contact:

Re: Idle on minimize

23 Jun 2015 01:18

Just close the program when you don't need it.
 
User avatar
dmex
Admin
Posts: 1698
Joined: 17 Jan 2011 05:43

Re: Idle on minimize

23 Jun 2015 04:31

Eran wrote:
Currently it seems Process Hacker uses pretty much the same amount of resources when it's invisible as it does when it is visible.
The CPU usage and overall utilization drops dramatically when PH is minimized... Try running 2 copies of PH and minimizing one to see the difference ;)
Eran wrote:
if I minimize the window and it keeps refreshing (even due I'm not going to see the information) it seems kind of wasteful.

Press F6 before minimizing or untick the Update automatically option found in the View menu? :?
 
User avatar
TETYYS
Contributor
Posts: 515
Joined: 23 Apr 2013 10:37
OS: Win 10 x64

Re: Idle on minimize

23 Jun 2015 06:58

wj32 wrote:
Just close the program when you don't need it.
Image
I keep PH open 24/7
 
User avatar
wj32
Founder
Posts: 948
Joined: 17 Jan 2011 05:19
OS: Windows
Contact:

Re: Idle on minimize

23 Jun 2015 07:31

TETYYS wrote:
I keep PH open 24/7
Hah I meant if OP is concerned about CPU usage then the best thing would be to close PH.
 
Eran
Member
Posts: 24
Joined: 15 Mar 2015 16:30
OS: Windows 8.1 64bit

Re: Idle on minimize

23 Jun 2015 13:26

dmex wrote:
The CPU usage and overall utilization drops dramatically when PH is minimized... Try running 2 copies of PH and minimizing one to see the difference ;)
I always run a single instance and the consumption stays pretty much the same. ProcessHacker.exe takes ~1% and Services.exe takes ~2% every refresh cycle. Granted that's not a big consumption and I can close it like wj32 said (which I currently do), but it's not ideal. I want PH to be open all the time, ready to go when I need it (just ATL+TAB away). Right now it feels like that saying "If a tree falls in a forest and no one is around to hear it, does it make a sound?" (when PH is minimized it keeps doing work that nobody sees and which becomes stale every refresh cycle, so what's the point for it?).
dmex wrote:
Press F6 before minimizing or untick the Update automatically option found in the View menu? :?
That's an interesting suggestion, but occasionally I'd forget to turn it back on and be left with stale/frozen information.
Why not add the option to untick it on minimize and tick it on restore? The functionality is already there (F6), it will just be more convenient to use.
 
User avatar
wj32
Founder
Posts: 948
Joined: 17 Jan 2011 05:19
OS: Windows
Contact:

Re: Idle on minimize

23 Jun 2015 13:47

Eran wrote:
ProcessHacker.exe takes ~1% and Services.exe takes ~2% every refresh cycle. Granted that's not a big consumption
So what's the issue then?
 
Eran
Member
Posts: 24
Joined: 15 Mar 2015 16:30
OS: Windows 8.1 64bit

Re: Idle on minimize

23 Jun 2015 14:40

wj32 wrote:
So what's the issue then?
Resource consumption changes across environments and versions. A while back I was experiencing 12% CPU usage for services.exe - I posted about it in the "Status bar + filter enhancements" and you gave me a dev version that solved it, but during that time I did experience performance issues.

Minimizing consumption when not needed (as an option), is a good design principle. It's not a critical issue, just something that is nice to have so even people using low spec PCs can leave it running in the background without experiencing degraded performance.
It also looks relatively easy to implement because you already offer a mechanism to turn on/off refresh cycles (e.g. F6), so we're basically talking about listening to the minimize/restore window messages to do it automatically (this is just an assumption, I haven't looked at the code).
 
User avatar
wj32
Founder
Posts: 948
Joined: 17 Jan 2011 05:19
OS: Windows
Contact:

Re: Idle on minimize

23 Jun 2015 16:02

Minimizing consumption when not needed (as an option), is a good design principle.
I agree.

And what happens to the tray icons and notifications and log entries and saved process priorities?
 
Eran
Member
Posts: 24
Joined: 15 Mar 2015 16:30
OS: Windows 8.1 64bit

Re: Idle on minimize

24 Jun 2015 14:11

wj32 wrote:
And what happens to the tray icons and notifications and log entries and saved process priorities?
The same exact thing that happens when you manually untick "Refresh Automatically".

I don't usually use the features you mentioned, but if I wanted to use them, I would leave refresh enabled (or just not minimize PH if the requested feature was available).
Another option might be to add a sub-menu to define the refresh interval when minimized. In that sub-menu the options can be something like:
- Use Global - which will use the global/normal refresh rate
- None - this will disable the refresh cycle when minimized.
- Fast
...
- Very Slow
If for example I wanted to use the CPU History option of the tray icon, I would choose "Very Slow", which will still get me updates but with reduced resource usage. For my usual use case I would set it to "None".
 
Eran
Member
Posts: 24
Joined: 15 Mar 2015 16:30
OS: Windows 8.1 64bit

Re: Idle on minimize

05 Jul 2015 15:36

Any thoughts?