-
Notifications
You must be signed in to change notification settings - Fork 111
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
Decouple /stat reading from the Process constructor #60
Comments
This is a good question. No, there is no good reason why the constructor always parses the I would definitely consider decoupling this. Do you think there is a cheap way to figure out the process ID? I would be a little sad if |
Is there a reason why the Note that I use the term "caching" for
As for One can even go further and future-proof things a bit by naming the constructor something like |
Can you explain this part a little more:
Is this because in But with |
Sorry, I've just realized that this caching problem I've introduced above seems to manifest itself only when the
|
hi @edigaryev I'm coming back to this issue after several months. I confess I am not sure where we stand on this topic, since I am not sure I really understood the issue you were trying to describe. What's your recommendation? I am still thinking about your suggestion to remove the |
Hi 👋! I'm mostly unaffected by this now, as I currently need some fields from I suggest that we close this for now, until the issue resurfaces again for someone else. |
Ok, sounds good. Thanks for letting me know. I've created a new tracking issue for this as to not forget about it. Thanks! |
Reading procfs is a rather slow operation and sometimes when reading it in bulk you only need a specific file like
/proc/<pid>/maps
, which is currently constructed throughProcess.maps()
.Is there a reason why the
Process
structure constructor reads and parses/proc/<pid>/stat
by default? Also, recently it got coupled even more, see bfd2c86.It would be nice to have bare
Process
structure and then query the related resources on an on-demand basis.The text was updated successfully, but these errors were encountered: