Save partner information gets very slow

Bug #1233153 reported by Marcel van der Boom (HS-Development BV)
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Medium
OpenERP's Framework R&D

Bug Description

Version 7.x [bzr] / postgres 9.1 / debian linux

Database has roughly 13.000 partner records.

When editting a partner and modifying one of the contact records of it the save operation is very slow (> 60 secs sometimes). When editting the partner contact record directly the performance is normal.(< 1 sec)

I'm at a loss what could cause this, the only thing which is odd is that the whole operation seems to play out in 'slow motion' in the log. The query log (--log-sql) shows the queries in a slower rate than other operations on the same installation.

The save operation completes successfully eventually, even if the client has timed out (which is our proxy configuration)

Things checked:
- all browsers affected
- there are no slow queries logged (>200ms) by Postgres
- the load of the application server nor the database server increases noticeably
- moved the whole installation to a local machine (to take out possible network errors) -> no difference
- full vacuum of database makes no difference

Revision history for this message
Marcel van der Boom (HS-Development BV) (mrb) wrote :

To clarify a bit:

The problem only occurs when editting the contact information in the 'subscreen' of a partner of type company.

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 1233153] Re: Save partner information gets very slow

Hello Marcel,
Could you try to disable the data duplication of the denormalization
process from the company to their contacts?
For instance try to to comment lines 507 and 508 here
https://github.com/akretion/openerp-server/blob/ocb-7.0/openerp/addons/base/res/res_partner.py#L507
restart and report us if this is any faster. This will corrupt the data so
don't use that in production, but that would be interesting to know if the
performance issue comes from the data duplication process.
Thanks for your feedback.

On Mon, Sep 30, 2013 at 10:37 AM, Marcel van der Boom (HS-Development BV) <
<email address hidden>> wrote:

> To clarify a bit:
>
> The problem only occurs when editting the contact information in the
> 'subscreen' of a partner of type company.
>
> --
> You received this bug notification because you are a member of OpenERP
> Drivers, which is subscribed to OpenERP Server.
> https://bugs.launchpad.net/bugs/1233153
>
> Title:
> Save partner information gets very slow
>
> Status in OpenERP Server:
> New
>
> Bug description:
> Version 7.x [bzr] / postgres 9.1 / debian linux
>
> Database has roughly 13.000 partner records.
>
> When editting a partner and modifying one of the contact records of it
> the save operation is very slow (> 60 secs sometimes). When editting
> the partner contact record directly the performance is normal.(< 1
> sec)
>
> I'm at a loss what could cause this, the only thing which is odd is
> that the whole operation seems to play out in 'slow motion' in the
> log. The query log (--log-sql) shows the queries in a slower rate than
> other operations on the same installation.
>
> The save operation completes successfully eventually, even if the
> client has timed out (which is our proxy configuration)
>
> Things checked:
> - all browsers affected
> - there are no slow queries logged (>200ms) by Postgres
> - the load of the application server nor the database server increases
> noticeably
> - moved the whole installation to a local machine (to take out possible
> network errors) -> no difference
> - full vacuum of database makes no difference
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-server/+bug/1233153/+subscriptions
>

Revision history for this message
Marcel van der Boom (HS-Development BV) (mrb) wrote :

Raphaël,

I (re-ran) benchmarks (5 manual runs) with and without the lines you specified and I'm seeing a response time improvement of 30% - 40%
(tested on local development machine)

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello,

As you can see in my above video, Its working fine and it takes less than 60 seconds to save.So, Would please elaborate more on this issue?

Thanks & waiting for your answer.

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Marcel,

from what you tested, the data denormalization itself here is hardly the
issue (it would be if it was making that time like 10x slower). An other
thing you could test, is to see if there are many Ajax requests during this
update. I've already seen that partner form loading slowly after save
because of the dynamic counters of the menu on the left. So monitoring Ajax
calls (your browser has options for that, like CTRL+MAJ+J on Chrome) could
be worth the test. Good luck.

On Tue, Oct 1, 2013 at 9:29 AM, Twinkle Christian(OpenERP)
<email address hidden>wrote:

> Hello,
>
> As you can see in my above video, Its working fine and it takes less
> than 60 seconds to save.So, Would please elaborate more on this issue?
>
> Thanks & waiting for your answer.
>
> ** Attachment added: "contact.ogv"
>
> https://bugs.launchpad.net/openobject-server/+bug/1233153/+attachment/3853260/+files/contact.ogv
>
> ** Changed in: openobject-server
> Status: New => Incomplete
>
> --
> You received this bug notification because you are a member of OpenERP
> Drivers, which is subscribed to OpenERP Server.
> https://bugs.launchpad.net/bugs/1233153
>
> Title:
> Save partner information gets very slow
>
> Status in OpenERP Server:
> Incomplete
>
> Bug description:
> Version 7.x [bzr] / postgres 9.1 / debian linux
>
> Database has roughly 13.000 partner records.
>
> When editting a partner and modifying one of the contact records of it
> the save operation is very slow (> 60 secs sometimes). When editting
> the partner contact record directly the performance is normal.(< 1
> sec)
>
> I'm at a loss what could cause this, the only thing which is odd is
> that the whole operation seems to play out in 'slow motion' in the
> log. The query log (--log-sql) shows the queries in a slower rate than
> other operations on the same installation.
>
> The save operation completes successfully eventually, even if the
> client has timed out (which is our proxy configuration)
>
> Things checked:
> - all browsers affected
> - there are no slow queries logged (>200ms) by Postgres
> - the load of the application server nor the database server increases
> noticeably
> - moved the whole installation to a local machine (to take out possible
> network errors) -> no difference
> - full vacuum of database makes no difference
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-server/+bug/1233153/+subscriptions
>

Revision history for this message
Marcel van der Boom (HS-Development BV) (mrb) wrote :

@tch-openerp:
  Thanks for the video. It does not however show what I meant. It misses the save action at the end.

- The delay occurs only when pressing the 'Save' button on the main partner record. Your video did not show this.
- Also, I have tested on a partner record with 8 contacts, which may show the delay more clearly than a partner with one contact

I'm sure the issue can be hidden by hardware that is sufficiently fast, but there is a huge difference in the two paths:

1. contacts / search contact 'A' from company 'B' / modify / save --> [fast]
2. contacts / search company 'B' / edit / edit contact 'A' / close / save --> [slow]

Revision history for this message
Marcel van der Boom (HS-Development BV) (mrb) wrote :

I traced the cause of 95% of the delay back to the setting ' VIES VAT Check' for the company.

If that setting is enabled, saving of any partner information is much slower. If the setting is disabled performance goes back to normal.

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello,

Yes, I am facing same issue with this information. So, I am confirming this.

Thanks,

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Medium
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.