Completion optimizations

@gokcennurlu and I attempted working around various large unneeded imports in the buildstream completions code path by extracting the click CLI functions to a different module.

This patch requires !234 (closed) and !231 (merged), so therefore is marked WIP, and requires some ugly deferred importing of modules. It does, however, reduce the time of the completion path from 600 ms to 150 ms on my system, which, while still not perfect, is at least a bit closer to usable.

Notable deferred/conditional imports that I don't think we will be able to work around:

Edited by Tristan Maat

Merge request reports

Loading