I have created a test suite to measure performance for some snap commands. The results are stores in this document doc.
These are the results for a rpi2:
Command | Time |
---|---|
services | 602 ms |
start | 114 ms |
stop | 120 ms |
logs | 124 ms |
interfaces | 136 ms |
interface | 128 ms |
connect | 3089 ms |
disconnect | 1881 ms |
list | 131 ms |
enable | 10970 ms |
disable | 1790 ms |
changes | 175 ms |
alias | 530 ms |
unalias | 519 ms |
aliases | 166 ms |
install_local | 113 ms |
remove_pack | 122 ms |
pack | 135 ms |
try | 17501 ms |
remove_try | 7057 ms |
Some things to review is the time the snap try command takes (17 sec), much more than the pack + install local (250 ms).
Also it is weird the time for the enable command, with is taking more than installing the snap.
Also something that could be reviewed is the time to complete the connect (about 3 seconds).
The objective of this analisys is to improve the performance time of the snap commands, and also to reduce the test time on devices with is taking about 4.5 hours to run the snapd suite.
There is an open PR with these tests PR