Versions Compared

Key

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

...

CaseQuery one out of many using descendant cps pathQuery one out of many using absolute cps path
Query//openroadm-device[@device-id="C201-7-1A-14"]/openroadm-devices/openroadm-device[@device-id="C201-7-1A-19"]
Comparison graph

Image Added

Image Added

Time complexity of
existing solution

O(N)O(N)
Time complexity of
proposed solution
O(1) to O(N), depending on how many nodes are matched by the descendant prefix.
For example, it is O(N) with the above query, but O(1) when using this query:
//openroadm-devices/openroadm-device[@device-id="C201-7-1A-14"] O(1)
O(1)

As seen in the graphs, query performance for current master branch is linear on the size of the database, while the PoC implementation is constant time (independent of database size).

...

Fetch descendantsOmit Descendants

Direct Descendants

All Descendants

Comparison graph

Image Added

Image Added

Image Added

Graph detail


Time complexity of
existing solution

O(N)?O(N2)O(N2)
Time complexity of
proposed solution
O(N)O(N)O(N)

...

Fetch descendantsOmit DescendantsDirect DescendantsAll Descendants
Comparison graph

Image Added

Image Added

Image Added

Graph detail



Time complexity of
existing solution

O(N)?O(N2)O(N2)
Time complexity of
proposed solution
O(N)O(N)O(N)

...