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 1gqWbq-0005Jy-WB for pgadmin-hackers@arkaria.postgresql.org; Mon, 04 Feb 2019 05:15:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gqWbp-0006FD-Kz for pgadmin-hackers@arkaria.postgresql.org; Mon, 04 Feb 2019 05:15:53 +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 1gqWbp-0006C4-FJ for pgadmin-hackers@lists.postgresql.org; Mon, 04 Feb 2019 05:15:53 +0000 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqWbl-0008Af-Ir for pgadmin-hackers@postgresql.org; Mon, 04 Feb 2019 05:15:52 +0000 Received: by mail-qt1-x836.google.com with SMTP id r9so2272741qtt.3 for ; Sun, 03 Feb 2019 21:15:49 -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=NuvJh7yfPdRiVX9Drqd4xRUNqLphDv9WiQSUsCq7ydQ=; b=FfQRLMOuJjhnxScQKrqwKUB+bzsjAfBoOnkQOGqQegNcOvQCnni/J9m8oCwjNhNeol IujI0ntyPHipLi9Iw5aGqs0aB1RmaJkT+gzMu/qQmNUm0jjgSIEnUrpdIBsw9Rflw8XK xoOGtnFHZanWPVGOmsiy1GGwBvDHlwcKhdiQjPXHfWYz85v1gGKWNAhz5z1Ybv9PzrMq 2j+TfME7p6ySJHrc9cUDG6B6R5eDmx0vKOIQQAevnPyrwlVV5Z5bNUPfEv4ANR2cOXUr NmGeoQ+4+VmvQif2vXnZWBThRgPwBkXtN3dp8Jm+ntrfvmAYSkmY4oZ8CxM8Vr4tZMC8 PSdg== 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=NuvJh7yfPdRiVX9Drqd4xRUNqLphDv9WiQSUsCq7ydQ=; b=h8H4cautVQdH3uO0rXikbt7RLjh2Z1xAhilkNPgJVhLYKKlsP6ItZs7f/bLZALU5Ym HrsjIetyhQWmXTVAO2VcO5rGSv6iM7bJlG2gQBC5HiTOKkHUkLs/rL7Hg1IRGW/6gcFX iiTo67BH8uiCE4qFUr7fr71sTI8tIHALTwdEd62BQvcOHorY5geCNNBmxvywPs3taiDj xX4UlSEVGlqqvqWId49HOSeB2tIBY5byDwFJsX5rIoQLrSWmHo9MXk1Bys8DKz2HqkKq w3ISh0lz36+L4P/T6TgBcNERijP/CDhfDxHZvZgtB/wsRiTgOeHah7AbDBCeXsX4PS2u eCIg== X-Gm-Message-State: AJcUukfXgpcGkRMUfGktoxVPqHuIV3IXf8VgiU/2ENvC0j+liYaOAo20 wjFW90muYpjIFitu1BisFTQW53gpQz9TLiKLwiE90Q== X-Google-Smtp-Source: ALg8bN4cOxCoQgK/KiJmu3DAey3w+BejvlYrbEv9cChCfRHHBF/uSzGd0kwEAX/lTItB2qKWqtpwbiKmTZt4lBom7To= X-Received: by 2002:a0c:9239:: with SMTP id a54mr45716967qva.17.1549257347830; Sun, 03 Feb 2019 21:15:47 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Mon, 4 Feb 2019 10:45:36 +0530 Message-ID: Subject: Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations To: Khushboo Vashi Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000e22c9905810a95dd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000e22c9905810a95dd Content-Type: text/plain; charset="UTF-8" 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* --000000000000e22c9905810a95dd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 Soft= ware Solutions |=C2=A0Pune
=
"Don't Complain about Heat, Pl= ant a tree"


--
Akshay Joshi
Sr. S= oftware Architect
=

Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
=
--000000000000e22c9905810a95dd--