Optimize CLI client dependency loading
The CLI client was quite heavy in loading in a lot of libraries and modules during runtime, which slowed it down quite a bit, especially on slower systems. This commit makes several major changes to help improve the situation. 1. Don't use pkg_resources to get our version, just hardcode it. 2. Reimplement our entire API call to use a custom http.client-based system that prevents importing any unnecessary libraries (with a custom User-Agent too). 3. Implement a lazy-loading method for some of the heavier modules, so that they are only loaded if absolutely necessary.
This commit is contained in:
2
debian/control
vendored
2
debian/control
vendored
@ -49,7 +49,7 @@ Description: Parallel Virtual Cluster common libraries
|
||||
|
||||
Package: pvc-client-cli
|
||||
Architecture: all
|
||||
Depends: python3-requests, python3-requests-toolbelt, python3-yaml, python3-lxml, python3-click
|
||||
Depends: python3-requests-toolbelt, python3-yaml, python3-lxml, python3-click
|
||||
Description: Parallel Virtual Cluster CLI client
|
||||
A KVM/Zookeeper/Ceph-based VM and private cloud manager
|
||||
.
|
||||
|
Reference in New Issue
Block a user