We won't go as far as the merge request shown below in
increasing buffer size, but we'll reduce substantially
total iterations while growing it to achieve one read.
[ and this seems in line with what was recently done ]
[ to accommodate the massively parallel environments ]
[ thru 2 abreast ('4') and combined cpus ('!') modes ]
Reference(s:
https://gitlab.com/procps-ng/procps/-/merge_requests/105
Signed-off-by: Jim Warner <james.warner@comcast.net>
rewind(fp);
fflush(fp);
- #define buffGRW 1024
+ #define buffGRW 8192
/* we slurp in the entire directory thus avoiding repeated calls to fgets,
especially in a massively parallel environment. additionally, each cpu
line is then frozen in time rather than changing until we get around to