-
Task
-
Resolution: Done
-
Medium
-
None
-
None
In NCMP, CM handles are saved using a CpsDataService method called saveListElementsBatch. This method has very poor performance compared to saveListElements.
Comparing the two methods:
void saveListElements(String dataspaceName, String anchorName, String parentNodeXpath, String jsonData, OffsetDateTime observedTimestamp); void saveListElementsBatch(String dataspaceName, String anchorName, String parentNodeXpath, Collection<String> jsonDataList, OffsetDateTime observedTimestamp);
saveListElementsBatch takes a collection of JSON, with one list element in each JSON:
{ "list-name": [ "element1": ... ] } { "list-name": [ "element2": ... ] } { "list-name": [ "element3": ... ] }
This has extremely poor performance, as the Yang parser is invoked for every item in the collection.
By comparison, saveListElements supports saving multiple list elements in a single batch, by wrapping the list elements in a single JSON array:
{ "list-name": [ "element1": ..., "element2": ..., "element3": ... ] }
This task is to change NCMP to use saveListElements, and remove the not needed saveListElementsBatch code.
- mentioned in
-
Page Loading...