* A yang type regex cache added, this helps the performance by avoiding re-running the regcomp command on every iteration.
* An XML namespace cache added (see `xml2ns()`) * Better performance of XML whitespace parsing/scanning.
This commit is contained in:
parent
728c97ab6d
commit
8c36083e16
8 changed files with 214 additions and 19 deletions
|
|
@ -146,7 +146,7 @@ generic_validate(yang_stmt *yspec,
|
|||
* and call application callback validations.
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] db The startup database. The wanted backend state
|
||||
* @param[out] xtr Transformed XML
|
||||
* @param[in] td Transaction
|
||||
* @param[out] cbret CLIgen buffer w error stmt if retval = 0
|
||||
* @retval -1 Error - or validation failed (but cbret not set)
|
||||
* @retval 0 Validation failed (with cbret set)
|
||||
|
|
@ -183,6 +183,10 @@ startup_common(clicon_handle h,
|
|||
clicon_debug(1, "Reading startup config from %s", db);
|
||||
if (xmldb_get(h, db, "/", &xt, msd) < 0)
|
||||
goto done;
|
||||
if (xml_child_nr(xt) == 0){ /* If empty skip */
|
||||
td->td_target = xt;
|
||||
goto ok;
|
||||
}
|
||||
if (msd){
|
||||
if ((ret = clixon_module_upgrade(h, xt, msd, cbret)) < 0)
|
||||
goto done;
|
||||
|
|
@ -225,6 +229,7 @@ startup_common(clicon_handle h,
|
|||
/* 7. Call plugin transaction complete callbacks */
|
||||
if (plugin_transaction_complete(h, td) < 0)
|
||||
goto done;
|
||||
ok:
|
||||
retval = 1;
|
||||
done:
|
||||
if (msd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue