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

Rewrite get_process_open_files() in C for OSX #152

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

Rewrite get_process_open_files() in C for OSX #152

giampaolo opened this issue May 23, 2014 · 7 comments

Comments

@giampaolo
Copy link
Owner

From g.rodola on February 23, 2011 03:16:10

Patch in attachment reimplements get_process_open_files() in C on OSX instead 
of parsing lsof output.

Before:
real    0m0.420s
user    0m0.137s
sys     0m0.267s

Now:
real    0m0.144s
user    0m0.082s
sys     0m0.056s

That's about 3x faster and far more reliable than current implementation.

Attachment: osx_open_files.patch

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

@giampaolo giampaolo self-assigned this May 23, 2014
@giampaolo
Copy link
Owner Author

From g.rodola on February 22, 2011 18:20:51

Committed in r937 .

Status: FixedInSVN

@giampaolo
Copy link
Owner Author

From g.rodola on February 28, 2011 13:55:27

Labels: Milestone-0.2.1

@giampaolo
Copy link
Owner Author

From g.rodola on February 28, 2011 15:15:33

Done also on FreeBSD in r942 .

Summary: Rewrite get_process_open_files() in C for OSX and FreeBSD
Labels: OpSys-FreeBSD

@giampaolo
Copy link
Owner Author

From g.rodola on March 03, 2011 07:10:34

It seems kinfo_getfile() is not available on FreeBSD versions < 8.0.
I think we can use kvm_*() calls instead, but I'd rather plan to do this in a 
future version.
As for now I'm going to revert this change and fall back on using lsof 
implementation.

Summary: Rewrite get_process_open_files() in C for OSX
Labels: -OpSys-FreeBSD

@giampaolo
Copy link
Owner Author

From g.rodola on March 04, 2011 09:05:51

Reverted in r944 .

@giampaolo
Copy link
Owner Author

From g.rodola on March 20, 2011 14:55:37

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 03:59:27

Updated csets after the SVN -> Mercurial migration: r937 == revision 
11445175ab4f r942 == revision c404fabfec56 r944 == revision 3d48861f1cf5

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