mirror of https://github.com/helm/helm
The completion of charts was using 'helm search repo' which can be quite slow as it must parse the entire yaml of every repo cache file. Using completion for a chart name can end up triggering multiple calls to 'helm search'; this makes the user experience poor, as there is a delay of over a second at every <TAB> press. This commit creates a cache file for each repo which contains the list of charts for that repo. The completion logic then uses this new cache file directly and obtains the chart names very quickly. With only the stable repo configured, this optimization makes the completion of charts about 85 times faster, going from 1.2 seconds to 0.014 seconds; such a difference gives a much better user experience when completing chart names. On the other hand, adding the creation of the chart list cache file to 'helm repo update' or 'helm repo add' is pretty much negligible compared to the downloading of the index file. It is also worth noting that when more repos are configured, 'helm search repo' only becomes slower, while the completion logic that uses the new chart list cache file will not be affected as it only looks for the single relevant repo file. Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>pull/6809/head
parent
985827d09a
commit
f437b4d6c9
Loading…
Reference in new issue