health
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health] Performance Tuning


From: Khurram Shahzad
Subject: Re: [Health] Performance Tuning
Date: Tue, 13 Dec 2016 20:28:56 +0500

Dear All,

Further investigations on the delayed response revealed that when we click 'New' button on patients' list, following background actions were run:

[2016-12-13 12:52:45,215] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.disease', '[]', None, {'
[2016-12-13 12:52:45,363] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.disability_assessment', 
[2016-12-13 12:52:45,488] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.amputation', '[]', None,
[2016-12-13 12:52:45,614] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.prothesis', '[]', None, 
[2016-12-13 12:52:45,739] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.menstrual_history', '[]'
[2016-12-13 12:52:45,861] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.mammography_history', '[
[2016-12-13 12:52:45,985] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.pap_history', '[]', None
[2016-12-13 12:52:46,108] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.colposcopy_history', '[]
[2016-12-13 12:52:46,231] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.surgery', '[]', None, {'shop': 1
[2016-12-13 12:52:46,363] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.cage', '[]', None, {'sho
[2016-12-13 12:52:46,484] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.recreational_drugs', '[]
[2016-12-13 12:52:46,614] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.genetic.risk', '[]', Non
[2016-12-13 12:52:46,772] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.family.diseases', '[]', 
[2016-12-13 12:52:46,900] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.ses.assessment', '[]', None, {'s
[2016-12-13 12:52:47,026] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.medication', '[]', None,
[2016-12-13 12:52:47,150] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.vaccination', '[]', None, {'shop
[2016-12-13 12:52:47,301] INFO trytond.protocols.dispatcher model.gnuhealth.patient.read(*([3], ['family', 'photo', 'recreational_drugs',
[2016-12-13 12:52:47,678] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.pap_history', '[["name",
[2016-12-13 12:52:47,792] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.menstrual_history', '[["
[2016-12-13 12:52:47,906] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.prothesis', '[["patient"
[2016-12-13 12:52:48,024] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.surgery', '[["patient", "=", 3]]
[2016-12-13 12:52:48,137] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.disability_assessment', 
[2016-12-13 12:52:48,254] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.family.diseases', '[["pa
[2016-12-13 12:52:48,368] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.cage', '[["name", "=", 3
[2016-12-13 12:52:48,490] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.disease', '[["name", "="
[2016-12-13 12:52:48,601] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.recreational_drugs', '[[
[2016-12-13 12:52:48,714] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.mammography_history', '[
[2016-12-13 12:52:48,826] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.medication', '[["name", 
[2016-12-13 12:52:48,940] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.vaccination', '[["name", "=", 3]
[2016-12-13 12:52:49,055] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.colposcopy_history', '[[
[2016-12-13 12:52:49,169] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.ses.assessment', '[["patient", "
[2016-12-13 12:52:49,310] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.genetic.risk', '[["patie
[2016-12-13 12:52:49,424] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.amputation', '[["patient
[2016-12-13 12:52:49,551] INFO trytond.protocols.dispatcher model.gnuhealth.patient.default_get(*(['family', 'photo', 'recreational_drugs
[2016-12-13 12:52:49,736] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.pap_history', '[["name",
[2016-12-13 12:52:49,849] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.menstrual_history', '[["
[2016-12-13 12:52:49,963] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.prothesis', '[["patient"
[2016-12-13 12:52:50,075] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.surgery', '[["patient", "=", -15
[2016-12-13 12:52:50,188] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.disability_assessment', 
[2016-12-13 12:52:50,302] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.family.diseases', '[["pa
[2016-12-13 12:52:50,425] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.cage', '[["name", "=", -
[2016-12-13 12:52:50,546] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.disease', '[["name", "="
[2016-12-13 12:52:50,659] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.recreational_drugs', '[[
[2016-12-13 12:52:50,774] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.mammography_history', '[
[2016-12-13 12:52:50,887] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.medication', '[["name", 
[2016-12-13 12:52:51,516] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.vaccination', '[["name", "=", -1
[2016-12-13 12:52:51,631] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.colposcopy_history', '[[
[2016-12-13 12:52:51,743] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.ses.assessment', '[["patient", "
[2016-12-13 12:52:51,879] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.genetic.risk', '[["patie
[2016-12-13 12:52:51,991] INFO trytond.protocols.dispatcher model.ir.ui.view_tree_state.get(*('gnuhealth.patient.amputation', '[["patient

As it is clear from the first element, the total time consumed in all these actions is about 7 seconds.

Luckily, I unchecked the following option from my Tryton Client:
Options -> Form -> Save Tree State

As a result of disabling this option, most of the above actions disappeared and the time decreased to under 2 seconds.

However I don't know, if disabling this setting has some negative effect!

Regards,
Khurram.

On Tue, Dec 13, 2016 at 10:50 AM, Khurram Shahzad <address@hidden> wrote:
Dear Luis,

I have made all the changes but there is no improvement in the performance. The only change I did not make is the dropping of old DB.

Any further advices please.

Best Regards,
Khurram.

On Sat, Dec 10, 2016 at 5:34 PM, Luis Falcon <address@hidden> wrote:
Dear Khurram

On Sat, 10 Dec 2016 16:46:31 +0500
Khurram Shahzad <address@hidden> wrote:

> Dear Luis,
>
> I have created the new database and ran the same command to see its
> collate: Name           |   Owner   | Encoding |   Collate   |
> Ctype    | Access privileges
> --------------------------+-----------+----------+-------------+-------------+-----------------------
>  Production_n | postgres  | UTF8     | C           | C           |
>
> I can see that the Collate and Ctype are just like those you
> suggested.
>
> I did not delete the old database yet. Is't it good to keep the old
> db with different name? Also, is it fine if I rename the new database
> and give it name of the old database so that I can avoid changing
> database name on all my clients?

The best is to use the same DB name, since not only you won't have to
modify the clients, but also, the attachments (dir $HOME/attach ) are
database name specific. That means that if you change the name, then
you would have to create links to the old name and it's a bit messy.

My advise is to test the performance on the newly recreated DB. If
it's satisfactory, make a good backup of the old DB, drop it and
recreate the DB with the same name.

PS: You can create the DB with the gnuhealth user (so the owner of
the DB will be gnuhealth instead of postgres)

Bests
Luis



--
 
Regards,
Khurram.



--
 
Regards,
Khurram.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]