Why the apic command is so slow? I am the only one? What should I do to understand the problem? It is present on my computer, on our deployment server, on the pcs of the other people working on this.
$ time apic help
Error: Il comando `help` non è valido.
real 0m15.852s
user 0m0.045s
sys 0m0.076s
or
$ time apic -v
API Connect: v5.0.6.1 (apiconnect: v2.5.17)
real 0m14.710s
user 0m0.046s
sys 0m0.091s
APIC toolkit for APIC v5 is based on Node.js framework. It uses a lot of modules that need to be loaded when apic
command is called.
So the speed is dependant on disk speed (but also on CPU & memory).
My test shows that initial load takes about 9 seconds on my 2 years old laptop:
$ time apic -v
API Connect: v5.0.8.4-iFix (apiconnect: v2.8.29)
real 0m9.206s
user 0m0.092s
sys 0m0.091s
This is test using Git Bash on Win 10 machine.
Second try (when a lot of files are cached) is 2 seconds faster:
$ time apic -v
API Connect: v5.0.8.4-iFix (apiconnect: v2.8.29)
real 0m6.625s
user 0m0.030s
sys 0m0.090s
Good news is that new version of the apic
CLI toolkit is written in Golang and compiled native to the platform.
This one is fast. By all standards. It is also more capable too.
time apic version
APIConnect toolkit c81e13c07d3c2c7730827610fcaf08bbec88fe04 (Built 2020-02-10T23:21:01Z) (Tag o.c3148da-g.c81e13c)
real 0m0.192s
user 0m0.141s
sys 0m0.094s
This test is done on the same laptop but using Ubuntu under WSL. I would suggest to either migrate to v2018 or use faster machine with modern SSD (not all SSDs are the same).