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.
Description
Description
Details
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
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | ENHANCEMENT | jestabro | T6471 Add an optimized get_config_dict for op-mode | ||
Open | ENHANCEMENT | jestabro | T6531 Extend optimization of op_mode_config_dict to ConfigTreeQuery class |