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

[Windows] batch multiple process info in one shot #2463

Open
giampaolo opened this issue Oct 17, 2024 · 0 comments
Open

[Windows] batch multiple process info in one shot #2463

giampaolo opened this issue Oct 17, 2024 · 0 comments

Comments

@giampaolo
Copy link
Owner

giampaolo commented Oct 17, 2024

This is a reminder ticket to continue the discussion started in #2366.
Recap: on Windows we use NtQuerySystemInformation(SystemProcessInformation) to collect multiple process info about all PIDs (Windows is the only platform which allows this). This data structure is used on a per-process basis, meaning it's discarded (or to put it another way, it's unnecessarily fetched for every Process instance).

psutil.process_iter() could be tweaked in a way that it passes the entire structure to the Process instances, and this way we would have a performance boost. In detail, read the considerations written in #2366 (comment).

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

1 participant