Comment 10 for bug 307718

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote : Re: [Bug 307718] Re: TOO MANY READS WHEN VIEWING A FORM VIEW: VERY SERIOUS PERF KILLER!

Raphaël Valyi - http://www.Smile.fr wrote:
> Hey very good, O(1) for me! So with your caching it sounds like reading all the selected records is perfectly OK!
> Ah, ah I chatted with the Tryton guys, Krier was saying your cache was not a good solution... Well one more proof it is!

Of course it is. On such objects (sales, products) we are up to 80% faster.
And we have: seaches on computed fields, reports on computed fields
(always good to be able to report on total of sales)
I know Tryton like to criticise Open ERP. But most of the time they are
not right.

> Saw your quality module. Last time I check some one week ago, I had very
> non consistent/absurd result like overall -3/10 for the built'in sale
> module, same kind of numbers for my own modules... So I hopped it's
> properly calibrated by now.

Yes, still in development.

> Oh, by the way, about documentation and your cache system: both Pedro Tarafeta and I couldn't find out how your cache in sale order really does:
> store={
> 'sale.order': (lambda self, cr, uid, ids, c={}: ids, None, 10),
> 'sale.order.line': (_get_order, None, 10),
> },
>
> What does that mean, what 10 means? I have a case where I should also
> trigger a cache invalidation, please could you document that in your dev
> wiki?

It's not like a cache system, we don't do invalidation and everything is
stored, not only some records cached. The cached value is ALWAYS correct.

For example, if you change a field in the sale order line that may
change the sale order total (None), then it recomputes the total of SO.

> Is 10 some kind of constant key? If yes, in Java we usually name
> constant key with an UPPER_CASE_STRING as an explicit indirection,
> nothing similar in Python?
10 is the priority of the computation. If you have the total included
taxes in SO line and in SO, you should better compute the total per line
and after on the SO.

We are working on new technical doc on this project:
   https://code.launchpad.net/openobject-doc
To improve the current wiki.

Thanks,

--
Fabien Pinckaers
CEO Tiny - OpenERP Editor
Chaussée de Namur 40
B-1367 Grand-Rosière
Belgium
Phone: +32.81.81.37.00
Fax: +32.81.73.35.01
Web: http://openerp.com

Great Achievements Start With Tiny Investments
   -- Marty, 2005