A Dilluns, 3 de desembre de 2012 07:45:45, Sharoon Thomas va escriure:
> On Dec 3, 2012, at 5:06 AM, Albert Cervera i Areny <[email protected]> 
wrote:
> > A Diumenge, 2 de desembre de 2012 17:16:49, Teagarden va escriure:
> > > On Dec 2, 2012, at 7:35 PM, Cédric Krier <[email protected]> wrote:
> > > > It could be possible to cache the default_get method but I'm not sure
> > > > it is a correct solution. I think it is better to say, you have to
> > > > create the singleton. Also I think it is the Property field that are
> > > > slow and they should be replace by explicit Function field using a
> > > > new table with real foreign key.
> > > 
> > > Property fields are probably one of the slowest components and the
> > > bottleneck appears to be the entity attribute value model on
> > > ir.property
> > 
> > Further testing, now with product.product, shows that translatable fields
> > also impose a huge overhead. Writing a thousand 1000 products takes as
> > much as 60 seconds with single insert and 112 seconds with multiple
> > inserts implementations. Part of the problem is the inheritance but that
> > almost only affects the multiple inserts implementation. In the single
> > insert version ~57 seconds are spent adding the translations.
> 
> Could it be the index [1] ?

My mistake. 57 seconds is spent creating translations but also writing to 
properties (list_price, cost_price_method & cost_price are properties).

Here are some numbers using sqlite and multiple query implementation:

Creating a 1000 records at once: 28s
Using create([]) instead of ir.translation set_ids(): 26s
Total amount of time spent setting properties: 10s

-- 
Albert Cervera i Areny
http://www.NaN-tic.com
Tel: +34 93 553 18 03

http://twitter.com/albertnan 
http://www.nan-tic.com/blog

-- 
-- 
[email protected] mailing list



Reply via email to