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

Cache processes informations #462

Closed
giampaolo opened this issue May 23, 2014 · 4 comments
Closed

Cache processes informations #462

giampaolo opened this issue May 23, 2014 · 4 comments

Comments

@giampaolo
Copy link
Owner

From nicolash...@gmail.com on January 03, 2014 10:08:35

Proposal  
In the Process class, the return of the cmdline function is not cached. Is it 
possible to cache it ? Does a command line can change during the process 
execution ?

Thk in advance

Original issue: http://code.google.com/p/psutil/issues/detail?id=462

@giampaolo
Copy link
Owner Author

From g.rodola on January 03, 2014 03:39:26

Yes it can change (I also wasn't aware), see issue 331 .
Perhaps we can investigate whether this is also true on Windows though.

@giampaolo
Copy link
Owner Author

From nicolash...@gmail.com on January 03, 2014 04:52:55

Sorry, i did not see the issue 331 . I understand why the cmdline is not 
cached. Netherless, I just try to see if i can reduce the CPU consumption of 
Glances ( http://github.com/nicolargo/glances ). Compare to stop, it take 
arround 10x CPU.

If you have any idea to reduce it...

Thk for your answer !

@giampaolo
Copy link
Owner Author

From g.rodola on January 03, 2014 05:41:06

Sure I know glances (very nice tool).
What platform are you talking about? Linux?
If it takes too much I think it's fine if you cache the cmdline yourself.
After all it's not something which should change that often.
Same for uids, gids, terminal and possibly others.
You might decide to cache those metrics and, say, update them every 10 secs or something.

@giampaolo
Copy link
Owner Author

From nicolash...@gmail.com on January 03, 2014 06:29:58

Ok i will try to make some benchs. Thk for support.

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