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 1gqa9Z-0007tX-9C for pgadmin-hackers@arkaria.postgresql.org; Mon, 04 Feb 2019 09:02:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gqa9X-0005LV-OT for pgadmin-hackers@arkaria.postgresql.org; Mon, 04 Feb 2019 09:02:55 +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 1gqa9X-0005LO-Ij for pgadmin-hackers@lists.postgresql.org; Mon, 04 Feb 2019 09:02:55 +0000 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqa9Q-0004vO-U3 for pgadmin-hackers@postgresql.org; Mon, 04 Feb 2019 09:02:54 +0000 Received: by mail-ot1-x334.google.com with SMTP id k98so11766917otk.3 for ; Mon, 04 Feb 2019 01:02:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8/SePwhgcIsxh8ENBsxKWoZ2bhZzEY4NKxusSqvQFZM=; b=Di0qMKt1KnQXK2OveY1Ujf+OUlspIJub4onXL7n4fIBvw52rfbpkAo78+WCVQPktbf A5v9iIQAOdNuoxwe3AlhAVbM4OrnxNaZc+B+YrQcAovZNiGnpN+JwbPP+mAthLB2PBIP n7ydfwD8ltA4XwYn3BaaJMxMPoCNsDv3HTv+LfLDKjgVbnU6m6FZtAndB42NaYowKYhu o7SzE2yj2ICDAjWEHZh03wBrIOeX+ohtLIoZPBiGLFouilWjYBn5VQAyai5wDAwoj0Vv 2HrPb5mQtSGYpJLPjQyIyQst9AIbun7AM+eau/C46Bct0RPEaKk3LVc5hsW9rA/M2ptc TNzw== 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=8/SePwhgcIsxh8ENBsxKWoZ2bhZzEY4NKxusSqvQFZM=; b=peAPZfZyIx4Hq2pSs7ksNHMtpgUVeyvceO2BI/Jq7A+6pp8mk8vwVMGiBdhrgxBnrC /sH9FfsJVfFA5EghwXakex+56tR0iEESLhcPmAbuewZsg6zfzE1NT4rtc3DN5wY4xltX izyxJXW7EJDchhf8ipLfhrlvqn94423WcEj8NsqepsTZZ/q/pfms5BGDn4uuLDudzy6Q T00iIbBQPABi76dJhWaVwcc5ioPQ5w6GIuYqNR1rICTKrtkURHnDq5j9+3YZ2CP8OPgP 0eIg4s8GTKqkpeFrxyMyz+78yE+1u7s6g530doXFkYUArmIuUeg1Fj0KvifF6k0/hQQR VVoA== X-Gm-Message-State: AHQUAuZ8YvoA7Rx8K8IwFIREqu5W9AMc4vcjq1sttHMW7kQg8cjQvdeR rvlF6AE/CFrdxaEe8HaZeLQm+U1NUeNsfonBP3aKFw== X-Google-Smtp-Source: AHgI3IY3tIKczjUKtyi1rWq71Vv1Oq0t0yiLM+MOaRlELhhTM1jprDyTV53dFo2X3+WG0a0XF3Fsjj7fEpYYQweG6Nc= X-Received: by 2002:aca:c591:: with SMTP id v139mr4427422oif.76.1549270966526; Mon, 04 Feb 2019 01:02:46 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Khushboo Vashi Date: Mon, 4 Feb 2019 14:32:35 +0530 Message-ID: Subject: Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations To: Akshay Joshi Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000009eff3705810dc139" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000009eff3705810dc139 Content-Type: text/plain; charset="UTF-8" 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 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* > --0000000000009eff3705810dc139 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Aditya,

I have reviewed the patch an= d it looks good to me except the logic to wait until we get the response fr= om 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 Josh= i <akshay.joshi@enterpr= isedb.com> wrote:
Hi Khushboo

Can you please r= eview it.

On Fri, Feb 1, 2019 at 7:04 PM Aditya Toshniwal <aditya.tosh= niwal@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 w= hich 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 eligi= ble, 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 |=C2=A0EnterpriseDB Software Solutions |= =C2=A0Pune
"Don't Complain about Heat, Plant a tree"=


--
Sr. Software Architect


Phone: +91 20-3058-9517
Mobil= e: +91 976-788-8246
--0000000000009eff3705810dc139--