Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqalf-0001Nq-50 for pgadmin-hackers@arkaria.postgresql.org; Mon, 04 Feb 2019 09:42:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gqald-0005uq-Qn for pgadmin-hackers@arkaria.postgresql.org; Mon, 04 Feb 2019 09:42:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqald-0005uj-G6 for pgadmin-hackers@lists.postgresql.org; Mon, 04 Feb 2019 09:42:17 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqala-0005ls-J8 for pgadmin-hackers@postgresql.org; Mon, 04 Feb 2019 09:42:17 +0000 Received: by mail-wr1-x443.google.com with SMTP id s12so13617250wrt.4 for ; Mon, 04 Feb 2019 01:42:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+TdXtMBnsauUA9OE4Qzxxz/GWqBs7flJ6PeWJt4AG6Y=; b=kEfSIQ+OVsY9FXPh6UaqOehehEgzXuierHPMtqU+LBWmb/dIn+ckx+WLH70WoiPLSI PIv0SJlcj2n90naCcoUvdR81onAXO3SzgZ7dWUCtltmEWZ3UhvAXwbPofk+xX9u6JJRl wX4WJ4RU8ZxmJeAFlzka6b3Em3tvuMjjAPG9zJh6E1MgG9mqUvw9jcY0Q78QU0ZG1sO+ ZNON0RQp3MlhN3md1NZLL7pYCviySLQ72+EXSQ/unqyNza38RpIxUHlmOePiLyb01cuV Ko8X4dRdn7p0E3hl33DgDZeGW0U82TTtr3FxQSD32V38bUjYJkFLDip9xcpUyj7dwdLF 1DiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+TdXtMBnsauUA9OE4Qzxxz/GWqBs7flJ6PeWJt4AG6Y=; b=Vj5tvR7dE8Tt4XxCLiWCYlgeG86d5AsiFCEN3odvnEeF7iWJPmOoYZTIhBOSeKAkhE /HQP5rNi8yqAWTA80HcW5LNb8omAalYLDHz9A/sfwIUoTS8NSlYS4r2hIFFUPxifxgvj E7iren9w4/YBKkZb73Nt5hdRjSo9tOKqVUzEjymrzIhyIWC80wlCB3EY1j0t9oPx/prd hyX5A7zawG1sJrUrgWguaQbhW3R8qTAxaO+YzqVLwfS/nLWGtiantD7h8WI+GNNXDpE8 RzojrvtscS7iKXrTK+YYhMXQIEHILcBDr4jdLMr1RG8QUfuk1NkNV8cFOm5xqDHA/BdJ vCbA== X-Gm-Message-State: AJcUukdb3Qw4t3clurdJDGoFVwVCUq3NEz9vz3uRNah1nlPeoGy+Ud7i qsMScxBamF5w30iJDYSk9hTsHRiMSbgsEMewtm8fjQ== X-Google-Smtp-Source: ALg8bN7WR7lISDiPBOn+b10zqdNdDCjkpFHzKr2zgTzGMgchS28Xbp1lrbBpMcbGd7GuVjfMiGc8xg3n4M/+SAILSyU= X-Received: by 2002:adf:97d1:: with SMTP id t17mr48676747wrb.283.1549273333208; Mon, 04 Feb 2019 01:42:13 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Dave Page Date: Mon, 4 Feb 2019 09:42:02 +0000 Message-ID: Subject: Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations To: Khushboo Vashi Cc: Akshay Joshi , pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000afdace05810e4ee5" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000afdace05810e4ee5 Content-Type: text/plain; charset="UTF-8" I can't get to this right now, but Akshay, can we get it in before the release? I don't think the problem Khushboo notes is really a problem. Waiting for a response before issuing another one seems sensible... as long as there's a timeout so things don't get stuck if a response gets lost somehow. Maybe the timeout should be something like 3x the normal interval? On Mon, Feb 4, 2019 at 9:02 AM Khushboo Vashi < khushboo.vashi@enterprisedb.com> wrote: > Hi Aditya, > > I have reviewed the patch and it looks good to me except the logic to wait > until we get the response from the AJAX request. > So, in this case at a time only one request is being sent to the server. > > @ Dave/Ashesh, if you think this is okay then we can commit the patch. > > Thanks, > Khushboo > > On Mon, Feb 4, 2019 at 10:45 AM Akshay Joshi < > akshay.joshi@enterprisedb.com> wrote: > >> Hi Khushboo >> >> Can you please review it. >> >> On Fri, Feb 1, 2019 at 7:04 PM Aditya Toshniwal < >> aditya.toshniwal@enterprisedb.com> wrote: >> >>> Hi Hackers, >>> >>> Attached is the patch to optimise the dashboard. Changes include: >>> 1) One ajax request for the all the charts instead of separate for every >>> chart. The next request will not hit until the previous is completed. >>> 2) The code will check for intervals which is greatest common divisor of >>> all the refresh rates. Chart names which will be eligible for refresh will >>> be sent with the ajax. If none are eligible, no ajax will be fired. >>> 3) In the backend, query is generated in such a way that data for all >>> the requested chart names will be fetched in one hit to the database. >>> 4) Test cases for charts rest api and javascript added. >>> >>> -- >>> Thanks and Regards, >>> Aditya Toshniwal >>> Software Engineer | EnterpriseDB Software Solutions | Pune >>> "Don't Complain about Heat, Plant a tree" >>> >> >> >> -- >> *Akshay Joshi* >> >> *Sr. Software Architect * >> >> >> >> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* >> > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --000000000000afdace05810e4ee5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I can't get to this right now, but Akshay, can we get = it in before the release?

I don't think the problem = Khushboo notes is really a problem. Waiting for a response before issuing a= nother one seems sensible... as long as there's a timeout so things don= 't get stuck if a response gets lost somehow. Maybe the timeout should = be something like 3x the normal interval?

On Mon, Feb 4, 2019 at 9:02 = AM Khushboo Vashi <kh= ushboo.vashi@enterprisedb.com> wrote:
Hi Aditya,

I have reviewed the patch and it looks good to me except the logic to wait= until we get the response from the AJAX request.
So, in this cas= e at a time only one request is being sent to the server.

@ Dave/Ashesh, if you think this is okay then we can commit the pat= ch.

Thanks,
Khushboo

On Mon, Feb 4,= 2019 at 10:45 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
=
Hi= Khushboo

Can you please review it.

On Fri, Feb 1, = 2019 at 7:04 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> = wrote:
Hi Hackers,

Attached is the patch to optimise the dashboard. Chang= es include:
1) One ajax request for the all the charts instead of separate = for every chart. The next request will not hit until the previous is comple= ted.
2) The code will check for intervals which is greatest common divisor = of all the refresh rates. Chart names which will be eligible for refresh wi= ll be sent with the ajax. If none are eligible, no ajax will be fired.
3) I= n the backend, query is generated in such a way that data for all the reque= sted chart names will be fetched in one hit to the database.
4) Test cases = for charts rest api and javascript added.

--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software Solutions |=C2= =A0Pune
"Don't Complain about Heat, Plant a tree"


--
= Akshay Joshi
Sr. Software Architect

=

<= /font>
Phon= e: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @p= gsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL = Company
--000000000000afdace05810e4ee5--