diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2024-07-20 18:30:06 -0700 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2024-07-31 08:08:53 -0400 | 
| commit | 4bc41193e810d3c93fc0ff0a5a7d7fe0f18c669b (patch) | |
| tree | e1439c74168209a2771a27121fb292d50e76ffc4 /vtysh | |
| parent | e26c580588b3689463c76aa96888147e53a48885 (diff) | |
vtysh, lib: preprocess CLI graphs
Store a parsed and built graph of the CLI nodes in vtysh, rather than
parsing and building that graph every time vtysh starts up.
This provides a 3x to 5x reduction in vtysh startup overhead:
`vtysh -c 'configure' -c 'interface lo' -c 'do show version'`
- before: 92.9M cycles, 1114 samples
- after: 16.5M cycles, 330 samples
This improvement is particularly visible for users scripting `vtysh -c`
calls, which notably includes topotests.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'vtysh')
| -rw-r--r-- | vtysh/.gitignore | 1 | ||||
| -rw-r--r-- | vtysh/subdir.am | 3 | 
2 files changed, 1 insertions, 3 deletions
diff --git a/vtysh/.gitignore b/vtysh/.gitignore index a6c3d4abc6..9cbd248f2f 100644 --- a/vtysh/.gitignore +++ b/vtysh/.gitignore @@ -1,5 +1,6 @@  vtysh  vtysh_cmd.c +vtysh_cmd.*.c  # does not exist anymore - remove 2023-10-04 or so  extract.pl diff --git a/vtysh/subdir.am b/vtysh/subdir.am index 2eae16d629..d39987eb83 100644 --- a/vtysh/subdir.am +++ b/vtysh/subdir.am @@ -17,9 +17,6 @@ vtysh_vtysh_SOURCES = \  	vtysh/vtysh_user.c \  	vtysh/vtysh_config.c \  	# end -nodist_vtysh_vtysh_SOURCES = \ -	vtysh/vtysh_cmd.c \ -	# end  noinst_HEADERS += \  	vtysh/vtysh.h \  | 
