Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-12868

Improve calls to the localStorage

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.1
    • 2.1.2
    • ambari-web
    • None

    Description

      methods like setDBProperty and getDBProperty work slow, if are used several times one after another. Example:

      var a = this.getDBProperty('a');
      var b = this.getDBProperty('b');
      var c = this.getDBProperty('c');
      

      Each getDBProperty-call does localStorage.getObject which may be slow if readable object is too big (it may take 100-150 ms). So, it's better to read list of values with one call, like:

      this.getDBProperties(['a', 'b', 'c']);
      

      And same for setDBProperties.

      Attachments

        1. AMBARI-12868.patch
          27 kB
          Oleg Nechiporenko
        2. AMBARI-12868_2.patch
          5 kB
          Oleg Nechiporenko
        3. AMBARI-12868_3.patch
          0.7 kB
          Oleg Nechiporenko

        Activity

          People

            onechiporenko Oleg Nechiporenko
            onechiporenko Oleg Nechiporenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: