* Experimental optimzations of yang-bind and sort for large lists
* Enabled by compile-time options: `OPTIMIZE_45_BIND` and `OPTIMIZE_45_SORT`
This commit is contained in:
parent
b8ec6a4957
commit
82529a2f16
23 changed files with 215 additions and 51 deletions
|
|
@ -645,7 +645,7 @@ from_client_edit_config(clicon_handle h,
|
|||
/* Cant do this earlier since we dont have a yang spec to
|
||||
* the upper part of the tree, until we get the "config" tree.
|
||||
*/
|
||||
if (xml_apply0(xc, CX_ELMNT, xml_sort, h) < 0)
|
||||
if (xml_sort_recurse(xc) < 0)
|
||||
goto done;
|
||||
if ((ret = xmldb_put(h, target, operation, xc, username, cbret)) < 0){
|
||||
clicon_debug(1, "%s ERROR PUT", __FUNCTION__);
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ startup_common(clicon_handle h,
|
|||
/* After upgrading, XML tree needs to be sorted and yang spec populated */
|
||||
if (xml_bind_yang(xt, YB_MODULE, yspec, NULL) < 0)
|
||||
goto done;
|
||||
if (xml_apply0(xt, CX_ELMNT, xml_sort, h) < 0)
|
||||
if (xml_sort_recurse(xt) < 0)
|
||||
goto done;
|
||||
/* Handcraft transition with with only add tree */
|
||||
td->td_target = xt;
|
||||
|
|
|
|||
|
|
@ -251,9 +251,9 @@ clixon_plugin_statedata_all(clicon_handle h,
|
|||
/* XXX: ret == 0 invalid yang binding should be handled as internal error */
|
||||
if (xml_bind_yang(x, YB_MODULE, yspec, NULL) < 0)
|
||||
goto done;
|
||||
if (xml_apply(x, CX_ELMNT, xml_sort, h) < 0)
|
||||
if (xml_sort_recurse(x) < 0)
|
||||
goto done;
|
||||
if (xml_apply(x, CX_ELMNT, xml_default, h) < 0)
|
||||
if (xml_default_recurse(x) < 0)
|
||||
goto done;
|
||||
if ((ret = netconf_trymerge(x, yspec, xret)) < 0)
|
||||
goto done;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue