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
- Version
- -
- 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 | ||
| On hold | ENHANCEMENT | None | T6531 Extend optimization of op_mode_config_dict to ConfigTreeQuery class | ||
| Resolved | BUG | jestabro | T6937 Schema generation broken in 1.4.1 due to missing import in op-mode script |