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

Only read states of specified process when refresh_processes_specifics #1445

Open
xiaopeng8570 opened this issue Dec 30, 2024 · 1 comment
Open

Comments

@xiaopeng8570
Copy link

When I call refresh_processes_specifics with specified pid, the function refresh_procs in process.rs always get all pid entries, then filter the specified process out.
Maybe it is not efficient for the case that I only need one process's information.
It will be much more slower with reading every task files of all processes, as issue #1432 says.

@sigsegved
Copy link

@xiaopeng8570 does this mean it reads stat files for all pids and then filters the result? that does seem super wasteful. I didnt realize that was the case.

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

No branches or pull requests

3 participants