Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations

2019-02-04 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to fix jasmine test cases. Didn't realise the
timezones could create issues :(
Kindly review.

On Mon, Feb 4, 2019 at 4:17 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the patch to change the dashboard test cases to fetch
> server_id similar to how it is done in other test cases.
>
> Kindly review.
>
> On Mon, Feb 4, 2019 at 3:43 PM Akshay Joshi 
> wrote:
>
>> Thanks patch applied.
>>
>> On Mon, Feb 4, 2019 at 3:27 PM Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Attached is the updated patch. The poller will wait 3 times the normal
>>> interval before sending new request if the previous request is pending.
>>> After that, it will send the ajax.
>>>
>>> Kindly review.
>>>
>>> On Mon, Feb 4, 2019 at 3:12 PM Dave Page  wrote:
>>>
 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.va...@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.jo...@enterprisedb.com> wrote:
>
>> Hi Khushboo
>>
>> Can you please review it.
>>
>> On Fri, Feb 1, 2019 at 7:04 PM Aditya Toshniwal <
>> aditya.toshni...@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

>>>
>>>
>>> --
>>> 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*
>>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"
>


-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"


RM3941.jasmine.patch
Description: Binary data


Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations

2019-02-04 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to change the dashboard test cases to fetch server_id
similar to how it is done in other test cases.

Kindly review.

On Mon, Feb 4, 2019 at 3:43 PM Akshay Joshi 
wrote:

> Thanks patch applied.
>
> On Mon, Feb 4, 2019 at 3:27 PM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Attached is the updated patch. The poller will wait 3 times the normal
>> interval before sending new request if the previous request is pending.
>> After that, it will send the ajax.
>>
>> Kindly review.
>>
>> On Mon, Feb 4, 2019 at 3:12 PM Dave Page  wrote:
>>
>>> 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.va...@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.jo...@enterprisedb.com> wrote:

> Hi Khushboo
>
> Can you please review it.
>
> On Fri, Feb 1, 2019 at 7:04 PM Aditya Toshniwal <
> aditya.toshni...@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
>>>
>>
>>
>> --
>> 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*
>


-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"


RM3941.apitest.patch
Description: Binary data


Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations

2019-02-04 Thread Akshay Joshi
Thanks patch applied.

On Mon, Feb 4, 2019 at 3:27 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the updated patch. The poller will wait 3 times the normal
> interval before sending new request if the previous request is pending.
> After that, it will send the ajax.
>
> Kindly review.
>
> On Mon, Feb 4, 2019 at 3:12 PM Dave Page  wrote:
>
>> 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.va...@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.jo...@enterprisedb.com> wrote:
>>>
 Hi Khushboo

 Can you please review it.

 On Fri, Feb 1, 2019 at 7:04 PM Aditya Toshniwal <
 aditya.toshni...@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
>>
>
>
> --
> 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*


Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations

2019-02-04 Thread Dave Page
On Mon, Feb 4, 2019 at 10:10 AM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Mon, Feb 4, 2019 at 3:36 PM Dave Page  wrote:
>
>> Hi
>>
>> Do we also give up waiting for the original response?
>>
> No, that will wait until AJAX request timeout. We do not cancel it
> explicitly. If response is received, it will be reflected.
>

OK, so it won't hang around forever. Thats fine.

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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations

2019-02-04 Thread Aditya Toshniwal
Hi Dave,

On Mon, Feb 4, 2019 at 3:36 PM Dave Page  wrote:

> Hi
>
> Do we also give up waiting for the original response?
>
No, that will wait until AJAX request timeout. We do not cancel it
explicitly. If response is received, it will be reflected.

>
> On Mon, Feb 4, 2019 at 9:57 AM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Attached is the updated patch. The poller will wait 3 times the normal
>> interval before sending new request if the previous request is pending.
>> After that, it will send the ajax.
>>
>> Kindly review.
>>
>> On Mon, Feb 4, 2019 at 3:12 PM Dave Page  wrote:
>>
>>> 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.va...@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.jo...@enterprisedb.com> wrote:

> Hi Khushboo
>
> Can you please review it.
>
> On Fri, Feb 1, 2019 at 7:04 PM Aditya Toshniwal <
> aditya.toshni...@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
>>>
>>
>>
>> --
>> Thanks and Regards,
>> Aditya Toshniwal
>> Software Engineer | EnterpriseDB Software Solutions | Pune
>> "Don't Complain about Heat, Plant a tree"
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"


Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations

2019-02-04 Thread Dave Page
Hi

Do we also give up waiting for the original response?

On Mon, Feb 4, 2019 at 9:57 AM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the updated patch. The poller will wait 3 times the normal
> interval before sending new request if the previous request is pending.
> After that, it will send the ajax.
>
> Kindly review.
>
> On Mon, Feb 4, 2019 at 3:12 PM Dave Page  wrote:
>
>> 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.va...@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.jo...@enterprisedb.com> wrote:
>>>
 Hi Khushboo

 Can you please review it.

 On Fri, Feb 1, 2019 at 7:04 PM Aditya Toshniwal <
 aditya.toshni...@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
>>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"
>


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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations

2019-02-04 Thread Aditya Toshniwal
Hi Hackers,

Attached is the updated patch. The poller will wait 3 times the normal
interval before sending new request if the previous request is pending.
After that, it will send the ajax.

Kindly review.

On Mon, Feb 4, 2019 at 3:12 PM Dave Page  wrote:

> 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.va...@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.jo...@enterprisedb.com> wrote:
>>
>>> Hi Khushboo
>>>
>>> Can you please review it.
>>>
>>> On Fri, Feb 1, 2019 at 7:04 PM Aditya Toshniwal <
>>> aditya.toshni...@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
>


-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"


RM3941_v2.patch
Description: Binary data


Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations

2019-02-04 Thread Dave Page
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.va...@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.jo...@enterprisedb.com> wrote:
>
>> Hi Khushboo
>>
>> Can you please review it.
>>
>> On Fri, Feb 1, 2019 at 7:04 PM Aditya Toshniwal <
>> aditya.toshni...@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


Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations

2019-02-04 Thread Khushboo Vashi
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.toshni...@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*
>


Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations

2019-02-03 Thread Akshay Joshi
Hi Khushboo

Can you please review it.

On Fri, Feb 1, 2019 at 7:04 PM Aditya Toshniwal <
aditya.toshni...@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*