Community mailing list archives

Re: sales order confirmation v9: speed issue

Stefan Rijnhart
- 02/01/2016 04:16:39
Thanks for the stats, very interesting. I have been doing some optimizations myself recently on 8.0 and it has occurred to me that Odoo's caching strategy at least in that version is not always very effective in the case of large numbers of records. Based on this experience, I'm guessing that processing a sale order with hundreds of lines performs considerably worse than processing hundreds of sale orders with a single line individually. It would be interesting to see how your results change if you test with larger orders.

I've gotten huge performance increases by disabling prefetching locally as well as implementing a custom prefetching strategy (to be applied locally) where only the current record was prefetched (i.e. do read all the flat fields for that single record when one field is being requested, but don't update the cache of hundreds of other records of the same model at the same time, which is the default strategy), and by deferring computation of function and related fields (processing some of the deferred computations manually at the end of the transaction, for instance replacing the computation of a related field on a large number of records with a single SQL query).

Where to apply these techniques is of course completely database dependent, and you definitely need to know what you are doing here or you could easily mess up the consistency of your data (in other words: don't try this at home).


On 31-01-16 01:21, Caudal Eric wrote:
<blockquote cite="" type="cite">
We made some load testing on AWS last year for a customer, and I wanted to share some results.

  1. Create partners (qty: 5K)
  2. Create products (qty: 10K)
  3. Create PO (qty: 12K w/ average 5 lines = 60K lines)
  4. Confirm PO
  5. Confirm IS (from PO)
  6. Create SO (qty: 12K w/ average 5 lines = 60K lines)
  7. Confirm SO
  8. Confirm DO (from SO)

Opener B.V. - Business solutions driven by open source collaboration

Stefan Rijnhart - Consultant/developer

tel: +31 (0) 20 3090 139