Hello people of Tryton,

I'm experiencing performance problems and had some questions about them.

I have a wizard that works like a sales register for retail sales.  It 
works as follows:

An employee enters in a list of products, their quantities and optionally 
new prices and then clicks process.  In the process method the sale and its 
lines are created with taxes, payment method, warehouse, party, etc.  Then 
the invoice is paid and the shipment is sent by running their workflows.

This process method takes from 30 seconds to over a minute to complete with 
one product in a sale.

I have around 12000 products and 1000 stock locations (arranged in a 
hierarchy).

I also have a lot of custom modules but I don't customize anything in 
accounting that I know of and that is just as slow as the shipping phase.

I'm running Tryton 2.6 with Postgresql 9.2 on a Gentoo machine (VPS) with 
2GB of ram and 8 cpus(2 priority).

I have inserted start/top print statements in my process method and overall 
most of the parts seem to be contributing to the slowness.

1st run (fresh start of client):
sale workflow took 0:00:30.055756
shipping took 0:00:24.810039
invoicing took 0:00:22.723529
do_process took 0:01:17.599376

2nd run (in case of aching):
sale workflow took 0:00:27.521843
shipping took 0:00:23:108033
invoicing took 0:00:20.545800
do_process took 0:01:11.184253

Here is the wizard code with the log/datetime.now statements:
https://gist.github.com/ianjosephwilson/5389138


Is this performance expected for my magnitude of products and locations?

Is there a better way to profile other than printing start/stop times?  I 
tried to splice in the python profiler but the output for a system as 
complex as tryton is pretty unhelpful.

Are there changes in 2.7+ that I could backport to improve performance?

It seems that running through this process manually is a bit faster than 
using the wizard.  Is it possible that running in the context of a wizard 
is disabling some sort of server side caching or adding some new overhead?

Could I be missing a C extension for something like relatorio?


Thanks for your time,

-Ian

Reply via email to