Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-905

Sorting setting storage improvement ideas

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.3-RC2
    • Fix Version/s: 5.2.0-B1
    • Component/s: Optimization
    • Labels:
      None
    • Additional information:
      Hide

      Plan:
      1. code to be changed is located in kDBEventHandler
      2. idea is to replace 4 calls to getListSetting/setListSetting method with 1 call (to each method)

      Show
      Plan: 1. code to be changed is located in kDBEventHandler 2. idea is to replace 4 calls to getListSetting/setListSetting method with 1 call (to each method)
    • Change Log Message:
      Reduces perform db query count
    • Story Points:
      1
    • External issue ID:
      1106
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      In Admin Console In-Portal makes 4 requests to database during each list-style template display. For example on Phrases list such requests are made:

      SELECT VariableValue, VariableName
      FROM PersistantSessionData
      WHERE VariableName = 'lang_Sort1.' AND PortalUserId = -1
      LIMIT 0,1

      SELECT VariableValue, VariableName
      FROM PersistantSessionData
      WHERE VariableName = 'lang_Sort1_Dir.' AND PortalUserId = -1
      LIMIT 0,1

      SELECT VariableValue, VariableName
      FROM PersistantSessionData
      WHERE VariableName = 'lang_Sort2.' AND PortalUserId = -1
      LIMIT 0,1

      SELECT VariableValue, VariableName
      FROM PersistantSessionData
      WHERE VariableName = 'lang_Sort2_Dir.' AND PortalUserId = -1
      LIMIT 0,1

      If we change sorting to be stored in one persistent session variable instead of 4 in "FieldName1,order1|FieldName,order2...." format, then we:

      1. save 3 requests to database each time

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Erik Snarski [Intechnic]
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: