Currently, the importer calls out to ansible-doc once per plugin found in a given collection. If the collection contains 150 modules, it calls ansible-doc 150 times.
In order to save backend processing time and hopefully speed up the time it takes Collection Explorer to load a collection, let's explore changing the importer to use a batched approach as demonstrated in the above example.
Currently, the importer calls out to
ansible-doc
once per plugin found in a given collection. If the collection contains 150 modules, it callsansible-doc
150 times.It's possible to pass many plugins to
ansible-doc
and potentially call it a single time for all 150 plugins. The following is a code example provided by the core Ansible team: https://gist.github.com/sivel/36cc0a2b6fc993db56ac821fcec3b72bIn order to save backend processing time and hopefully speed up the time it takes Collection Explorer to load a collection, let's explore changing the importer to use a batched approach as demonstrated in the above example.