Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-1326

Creation of DataNodeBuilder with module name prefix is very slow

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Medium
    • Resolution: Done
    • London Release
    • London Release
    • CPS-Core

    Description

      JosephKeenan 

      Grooming update :

      Module X declare Container A, child container B
      Module X imports Module Y

      Module Y declares Container C, child container D

      A
      +B
        +C
          +D

      XPath without prefix /A/B/C/D

      Our current solution, only adds very first Module Prefix:    X:A/B/C/D  but in a very inefficient manner

      Future (proper) solution should had at each module chance a prefix:   X:A/B/Y:C/D

      Scope of bug-fix: Fix the performance issue by decouple the SQL-Query for all fragments form the implementation to get the prefix for the TOP level Fragment

      A/C

      1. Functionality unchanged, see scenarios 1 & 2 below
      2. De-coupling can only be checked as code-review

      Out of scope

      1. Insertion of prefix for different modules (separate:  Jira CPS-1301

       

      Scenario 1. get for actual top-level container (with children). Note the insertoint of 'stores:' prefix (only for bookstore)

      {
          "stores:bookstore": {
              "bookstore-name": "Easons",
              "staff": {
                  "manager": "John Smith",
                  "members": [
                      {
                          "name": "Some Guy"                },
                      {
                          "name": "Another Person"                }
                  ]
              },
              "inventory": {
                  "categories": [
                      {
                          "code": 2,
                          "name": "/TIMER.TIMER/TIMER",
                          "numberOfBooks": 1,
                          "books": [
                              {
                                  "title": "Matilda"                        }
                          ]
                      },
                      {
                          "code": 1,
                          "name": "/DAL.DAL/DA",
                          "numberOfBooks": 2                }
                  ]
              }
          }
      }

      Scenario 2. get for any child-container (with children). Note the insertion of 'stores:' prefix (only for 'inventory')

      {
          "stores:inventory": {
              "categories": [
                  {
                      "code": 2,
                      "name": "/TIMER.TIMER/TIMER",
                      "numberOfBooks": 1,
                      "books": [
                          {
                              "title": "Matilda"
                          }
                      ]
                  },
                  {
                      "code": 1,
                      "name": "/DAL.DAL/DA",
                      "numberOfBooks": 2
                  }
              ]
          }
      }

       

      Attachments

        Issue Links

          # Subject Branch Project Status CR V

          Activity

            People

              sourabh_sourabh Sourabh Sourabh
              sourabh_sourabh Sourabh Sourabh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: