shanecode / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

Process.name unnecessarily calls exe() #431

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On basically all UNIX systems the process name we get is truncated to the first 
15 characters so in case the the name matches the first part of the process 
cmdline we return that one instead because it's usually more explicative (e.g. 
"gnome-keyring-d" vs. "gnome-keyring-daemon").

Problem is we do this all the time, even if len(name) < 15 characters so we 
unnecessarily retrieve process cmdline every time we're interested just in the 
process name:
https://code.google.com/p/psutil/source/browse/psutil/__init__.py?spec=svn890e3d
6e20838ea11c86edb8990a0cac730a224e&r=32ca76279dced38e87e8c68b5a203f7ade365672#29
4

Fixed in revision dfe28538a19f.

Original issue reported on code.google.com by g.rodola on 21 Sep 2013 at 5:47

GoogleCodeExporter commented 9 years ago

Original comment by g.rodola on 28 Sep 2013 at 10:06

GoogleCodeExporter commented 9 years ago
Closing out as fixed. Release 1.1.0 is now available for download.

Original comment by g.rodola on 28 Sep 2013 at 5:32