Performance: A change in the merge code made "co-located" config and non-config get retrieval go considerable faster.

This commit is contained in:
Olof hagsand 2023-05-29 10:47:00 +02:00
parent 3e34a61bd2
commit a97a66cb92
3 changed files with 8 additions and 3 deletions

View file

@ -57,9 +57,9 @@ Developers may need to change their code
* `yang2cli_yspec` removed last argument `printgen`.
* Removed obsolete: `cli_auto_show()`
### Minor features
* Performance: A change in the `merge` code made "co-located" config and non-config get retrieval go considerable faster.
* CLI: Added `show statistics` example code for backend and CLI memory stats
* [Support yang type union with are same subtypes with SNMP](https://github.com/clicon/clixon/pull/427)
* Removed obsolete compile options introduced in 6.1:

View file

@ -520,6 +520,7 @@ validate_common(clicon_handle h,
&td->td_tcvec, /* changed: wanted values */
&td->td_clen) < 0)
goto done;
if (dbglevel & CLIXON_DBG_DETAIL)
transaction_dbg(h, CLIXON_DBG_DETAIL, td, __FUNCTION__);
/* Mark as changed in tree */
for (i=0; i<td->td_dlen; i++){ /* Also down */

View file

@ -972,6 +972,7 @@ xml_child_order(cxobj *xp,
* xprev = x;
* }
* @endcode
* @note Assumes attributes are first in list
* @see xml_child_index_each
*/
cxobj *
@ -990,8 +991,11 @@ xml_child_each(cxobj *xparent,
xn = xparent->x_childvec[i];
if (xn == NULL)
continue;
if (type != CX_ERROR && xml_type(xn) != type)
if (type != CX_ERROR && xml_type(xn) != type){
if (type == CX_ATTR) /* Assume sorted attributes are first */
return NULL;
continue;
}
break; /* this is next object after previous */
}
if (i < xparent->x_childvec_len) /* found */