diff options
author | Ron Yorston <rmy@pobox.com> | 2024-07-30 10:28:29 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-07-30 10:28:29 +0100 |
commit | dde99c5ae2511f8509dae85ce33b22d554ce157c (patch) | |
tree | 83dc4c25f647e4d93bf321a2c82b88f7c43fb897 /TODO | |
parent | bb8f6b688a6a8c7ac66b5c656d2544f9167a1abe (diff) | |
download | busybox-w32-dde99c5ae2511f8509dae85ce33b22d554ce157c.tar.gz busybox-w32-dde99c5ae2511f8509dae85ce33b22d554ce157c.tar.bz2 busybox-w32-dde99c5ae2511f8509dae85ce33b22d554ce157c.zip |
ash: rewrite waitpid_child() to improve performance
After the previous commit there was still a slight disparity
between shell performance with and without background jobs.
Reduce this disparity by the following changes:
- Remove the pidlist array. The PID of the exiting process can be
obtained from its handle.
- Save the proclist array between calls. It will always grow to
support the required number of PIDs.
- Combine the loops to compute the required size of proclist and
to fill it. This saves a few bytes with no measurable impact
on performance.
Saves 8 bytes in a 32-bit build, adds 32 in 64-bit.
(GitHub issue #434)
Diffstat (limited to 'TODO')
0 files changed, 0 insertions, 0 deletions