mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Apparently the repeated string concatenation and word splitting was much slower. While at it, also remember in $ZFCP_UNIT_PATH whether the loop over ZFCP_UNIT_ARRAY already found a zfcp_unit and re-use the path string to replace the previous file glob construct generating the zfcp_unit path by means of pathname expansion. This only works for the extended output case. Before: $ time lszfcp -De | wc -l 1036 real 2m15.387s user 2m9.323s sys 0m5.130s After: $ time ~/git/s390-tools/zconf/lszfcp -De | wc -l 1036 real 0m17.605s user 0m17.159s sys 0m0.308s Reviewed-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Steffen Maier <maier@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>