Refactoring for better performance of large auto-cli specs

* Fixed: [very slow execution of load_set_file #288](https://github.com/clicon/clixon/issues/288)
* New `clixon-lib@2021-11-11.yang` revision
  * Modified option: RPC stats extended with YANG stats
* Modified `clixon-config@2021-11-11.yang` revision
  * Added option:
    * CLICON_PLUGIN_CALLBACK_CHECK
    * Enable to make plugin context check before and after all callbacks.
* Added statistics for YANG: number of objects and memory used
* Use the treeref no-copy option of CLIgen to reduce memory
* Refactored cli-generation/autocli-start code
* Refactored cligen glue functions to use cligen_eval directly (remove clicon_eval,clixon_cligen_eval)
This commit is contained in:
Olof hagsand 2021-11-25 12:04:05 +01:00
parent b91ce762d5
commit 5388aace12
29 changed files with 760 additions and 451 deletions

View file

@ -134,6 +134,7 @@ main(int argc,
break;
}
clicon_debug_init(dbg, NULL);
yang_init(h);
/* Find and read configfile */
if (clicon_options_main(h) < 0)
goto done;

View file

@ -176,6 +176,7 @@ main(int argc,
goto done;
if (clicon_conf_xml_set(h, xcfg) < 0)
goto done;
optind = 1;
opterr = 0;
while ((c = getopt(argc, argv, UTIL_XML_OPTS)) != -1)
@ -241,6 +242,7 @@ main(int argc,
}
clicon_log_init(__FILE__, dbg?LOG_DEBUG:LOG_INFO, logdst);
clicon_debug_init(dbg, NULL);
yang_init(h);
/* 1. Parse yang */
if (yang_file_dir){

View file

@ -228,7 +228,8 @@ main(int argc,
clicon_log_init("xpath", dbg?LOG_DEBUG:LOG_INFO, logdst);
clicon_debug_init(dbg, NULL);
yang_init(h);
/* Parse yang */
if (yang_file_dir){
if ((yspec = yspec_new()) == NULL)