ansible / galaxy-dev

Ansible Automation Hub
11 stars 13 forks source link

Importer: batch ansible-doc calls #220

Closed chouseknecht closed 4 years ago

chouseknecht commented 4 years ago

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.

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/36cc0a2b6fc993db56ac821fcec3b72b

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.