...
Case | Query one out of many using descendant cps path | Query 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 | ||
Time complexity of | 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 descendants | Omit Descendants | Direct Descendants | All Descendants |
---|---|---|---|
Comparison graph | |||
Graph detail | |||
Time complexity of | O(N)? | O(N2) | O(N2) |
Time complexity of proposed solution | O(N) | O(N) | O(N) |
...
Fetch descendants | Omit Descendants | Direct Descendants | All Descendants |
---|---|---|---|
Comparison graph | |||
Graph detail | |||
Time complexity of | O(N)? | O(N2) | O(N2) |
Time complexity of proposed solution | O(N) | O(N) | O(N) |
...