[Toybox] [PATCH] Make lsof 10x faster by caching /proc/net socket info.

enh enh at google.com
Sat Mar 19 09:02:39 PDT 2016


I deliberately didn't do this first time round because for me our lsof
is already 10x faster than traditional lsof, and caching means we potentially
give less information about a socket that's created while we're running.
It turns out that traditional lsof caches anyway, so I guess nobody cares.

This also fixes a mistake where lsof used CFG_FREE instead of CFG_TOYBOX_FREE.
---
 toys/pending/lsof.c | 96 ++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 61 insertions(+), 35 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-lsof-10x-faster-by-caching-proc-net-socket-info.patch
Type: text/x-patch
Size: 6742 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20160319/afb1db8c/attachment-0004.bin>


More information about the Toybox mailing list