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

[Bug]: Herd UI excessive CPU usage when idling #1200

Open
VaguelyOnline opened this issue Dec 17, 2024 · 4 comments
Open

[Bug]: Herd UI excessive CPU usage when idling #1200

VaguelyOnline opened this issue Dec 17, 2024 · 4 comments
Labels

Comments

@VaguelyOnline
Copy link

Platform

Windows

Operating system version

Windows 10 10.0.19045 build 19045

System architecture

Intel (x86)

Herd Version

1.13.0

PHP Version

No response

Bug description

Love herd - but the CPU usage when just idling appears to be overly high. Herd is not doing anything other than run the UI, accounting for ~25% total CPU usage. Task manager suggests a run away thread. This behaviour is consistent across all of my Windows machines, across multiple boots.

GfAIWyzWUAAUEOb

Steps to reproduce

No response

Relevant log output

No response

@mpociot
Copy link
Member

mpociot commented Dec 17, 2024

Are you running any services / are you using Herd Pro or does this happen on a fresh installation as well for you?

@VaguelyOnline
Copy link
Author

Thanks for the response. And kudos and much love for making such a great tool. Wouldn't want the report construed as a criticism of the product as such - it's great, looks great, works great for the most part. Just concerned about the excessive resource usage.

The screenshot above shows services running (note the PHP CGI processes). However, it's the same CPU profile when services are not running (shown below).

image

I'm running the standard (non-pro) version. Haven't tried on a fresh installation, but can do that. Want me to upload any logs?

@mpociot
Copy link
Member

mpociot commented Dec 18, 2024

I just tried to reproduce this on my Windows 11 laptop as well as on various VMs and I am unable to see results that are somewhat similar.
The CPU usage remains even below 1% for me 🤔

image

It would be great if you could maybe do a screen recording to see how the CPU usage evolves or if it happens as soon as you start the application, as it's quite tricky to reproduce.

@mpociot mpociot added needs more information Further information is requested and removed macOS labels Dec 18, 2024
@VaguelyOnline
Copy link
Author

Recording can you seen here: https://youtu.be/rCPHGShwec4

I think I may figured out what's happening. the path folders (where Herd will look for sites) was configured to use several locations across a few drives. One of those drives has since been removed and was therefore inaccessible. My guess is that the Herd UI got stuck in a loop of trying to access this location, failing, and then trying again.

Interestingly, I think that the issue was also preventing the 'exit' menu button in the system tray from working (I was being forced to kill the process to exit).

Removing the detached drive from the Herd configuration causes CPU usage to drop to normal levels. Perhaps the fix involves taking a look at how Herd checks the configured paths?

image

I did a simple test with adding a folder and then deleting that folder, and that did not replicate the issue. Perhaps it only manifests when attempting to access a no-longer-accessible drive.

I don't believe that Herd is open source - but if I'm wrong, feel free to shoot me a link to the repo and I'll take a look with a view to create a PR with a fix.

@github-actions github-actions bot removed the needs more information Further information is requested label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants