Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 022F118DE3 for ; Tue, 25 Aug 2015 10:56:46 +0000 (UTC) Received: (qmail 86377 invoked by uid 500); 25 Aug 2015 10:56:45 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 86342 invoked by uid 500); 25 Aug 2015 10:56:45 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 86323 invoked by uid 99); 25 Aug 2015 10:56:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2015 10:56:45 +0000 Date: Tue, 25 Aug 2015 10:56:45 +0000 (UTC) From: "Oleg Nechiporenko (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-12868) Improve calls to the localStorage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-12868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Nechiporenko updated AMBARI-12868: --------------------------------------- Attachment: AMBARI-12868.patch > Improve calls to the localStorage > --------------------------------- > > Key: AMBARI-12868 > URL: https://issues.apache.org/jira/browse/AMBARI-12868 > Project: Ambari > Issue Type: Bug > Components: ambari-web > Affects Versions: 2.1.1 > Reporter: Oleg Nechiporenko > Assignee: Oleg Nechiporenko > Fix For: 2.1.2 > > Attachments: AMBARI-12868.patch > > > methods like {{setDBProperty}} and {{getDBProperty}} work slow, if are used several times one after another. Example: > {code:javascript} > var a = this.getDBProperty('a'); > var b = this.getDBProperty('b'); > var c = this.getDBProperty('c'); > {code} > 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: > {code:javascript} > this.getDBProperties(['a', 'b', 'c']); > {code} > And same for {{setDBProperties}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)