Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this scenario, 300 Open ROADM device nodes are already defined. A number of these data nodes will be deleted using CpsDataService::deleteDataNodes. The types of nodes will be varied, for example, deleting container nodes, list elements, or whole lists.

Test results

N50100150200250300Example xpath
Delete top-level container node-----0.630/openroadm-devices
Batch delete N/300 container nodes0.1500.2610.3770.4530.5530.686/openroadm-devices/openroadm-device[@device-id='C201-7-1A-10']/org-openroadm-device
Batch delete N/300 lists elements0.1320.2480.3380.4490.5450.670/openroadm-devices/openroadm-device[@device-id='C201-7-1A-49']
Batch delete N/300 whole lists0.5091.0541.4011.8482.1342.555/openroadm-devices/openroadm-device[@device-id='C201-7-1A-293']/org-openroadm-device/degree
Try batch delete N/300 non-existing0.2500.5350.6670.9511.1451.318/path/to/non-existing/node[@id='27']

Observations

  • Delete performance is linear on the amount of data being deleted (as expected).
  • Raw performance of deleting containers of list elements is around 40,000 fragments per second. (So we can delete data nodes around 10x faster than creating them.)
  • Deleting lists is much slower than deleting the parent container of the list (which can be easily improved).
  • Of note, attempting to delete non-existing data nodes takes longer than actually deleting the equivalent amount of nodes with descendants - it is a slow operation.Deleting lists is much slower than deleting the parent container of the list.

Suggested improvement: For whole list deletion, add a condition to the WHERE clause in the SQL for deleting lists, to narrow the search space to children of the parent. For example:

SELECT * FROM fragment WHERE (existing conditions)
  AND parent_id = (SELECT id FROM fragment WHERE xpath = '/parent-xpath')

...

Suggested improvement: Add a condition to the WHERE clause in the SQL for reading lists, to narrow the search space to children of the parent. For example:

SELECT * FROM fragment WHERE (existing conditions)
  AND parent_id = (SELECT id FROM fragment WHERE xpath = '/parent-xpath')

...