Closed dudicoco closed 2 years ago
Do you see the same magnitude of slowness if you do e.g.
yq '.' "${files[@]}"
?
I wonder if you are just measuring the Python startup time instead of the tool performance.
yq is subject to performance limitations of Python and PyYAML (in plain Python parsing mode, since yq makes a number of customizations to the parsing process). There are no plans to dedicate resources to improving performance beyond what will be available in future versions of Python. As @SethMMorton correctly points out, streaming multiple documents (separated by ---
) can amortize the startup time. PRs to improve performance are welcome.
When processing a lot of files with
yq
, the performance impact is noticeable:It takes around 15 seconds to process 650 files, while
jq
takes around 1-2 seconds.