Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This slightly reduces the overhead of the `lxc` command. In this rough benchmark, `lxc help >/dev/null` is used as it is self-contained (make no API call). Baseline: ``` $ timeout 30 bash -c 'i=0; trap "echo \$i" EXIT; while i=$((i+1)); do lxc help >/dev/null; done' 598 ``` PR changes applied: ``` $ sudo mount -o bind,ro snapcraft/commands/lxc /snap/lxd/current/commands/lxc $ timeout 30 bash -c 'i=0; trap "echo \$i" EXIT; while i=$((i+1)); do lxc help >/dev/null; done' 620 ``` This is a meager improvement (~3.5%) but it moves the needle in the right direction. From ~19.93 execs/second to ~20.67 execs/second. For comparison's sake, here's what I get from a simple **non-snap** binary (~1192 execs/second): ``` $ timeout 30 bash -c 'i=0; trap "echo \$i" EXIT; while i=$((i+1)); do /usr/bin/echo foo >/dev/null; done' 35767 ```
- Loading branch information