Versions Compared

Key

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

...

The test data is using the openroadm model, present in the integration-test module of CPS source code repository. In this case, each 'device node' has 86 data nodes. In these tests, four anchors were populated using the same data. Thus, for 3000 device nodes, there are 3000 devices x 86 data nodes x 4 anchors = 1,032,000 total data nodes.

The test timings used to generate the charts in this document is available as a spreadsheet: CPS-1646 CpsPath queries using path-component lookup.xlsx

Performance Comparison

Query one device out of many (1 out of N)

...

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).

(Note, : I have not illustrated all different fetchDescendantOptions, as it has only minor impact in this the case of fetching 1 device node.)

Query all devices (N out of N) using descendant cps path

...

Presently, only case 1 will return data, and cases 2 and 3 return nothing. Given the proposed solution uses an SQL sub-query for each path-component, with a little work, the query generator can be adapted to support cases 2 and 3 could be supported. The main work required for this would be changes to the Cps Path parser.

Other operations can be accelerated

...

We can optimize for this case, by checking if xpath_component = "books[@title='Matilda']", thus avoiding the need to examine the attributes field in the fragment table.

...