Page MenuHomeVyOS Platform

Add an optimized get_config_dict for op-mode
Closed, ResolvedPublicENHANCEMENT

Description

Config() loads the full config, an overhead ameliorated in config-mode by the use of vyos-configd and caching of the config_dict itself. Those optimizations are not available in op-mode, and the use of ConfigTreeQuery incurs the same overhead, due to the implicit use of Config. When calling get_config_dict on an empty (top-level) path, this overhead is unavoidable until we have an in-memory resident configtree, however, for subpaths, it would be useful to have an optimized get_config_dict that reads only the subtree: for example, for op-mode show commands, this provides a noticeable improvement for a moderately sized config.

Details

Difficulty level
Normal (likely a few hours)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Performance optimization