commit | 3e3f964e43d6fec8fe0db536a9054567239547c7 | [log] [tgz] |
---|---|---|
author | Sergei Trofimov <sergei.trofimov@arm.com> | Thu Oct 05 16:37:30 2017 +0100 |
committer | Sergei Trofimov <sergei.trofimov@arm.com> | Thu Oct 05 16:41:26 2017 +0100 |
tree | e0086c69be238ba5ca07df806ca5a422171ee5f9 | |
parent | d1e83b53a32d75848712c2c5aa1fd57b888db94e [diff] |
shuilt: re-introduce speedup The previous fix for read_tree_values fixed the issue with sh not supporting arrays, but looping over paths and counting them. Hover each count increment requires spawning a subshell. For a large number of paths, this can eat away any performance benefits of using read_tree_values. Since we only care whether the count is greater than one, detect that and break out of the loop early to re-introduce the performance improvement.