A Dissabte, 17 de novembre de 2012 23:29:08, Cédric Krier va escriure:
> On 17/11/12 20:48 +0100, Albert Cervera i Areny wrote:
> > A Diumenge, 4 de març de 2012 03:49:24, [email protected] va 
escriure:
> > > Reviewers: ,
> > > 
> > > 
> > > 
> > > Please review this at http://codereview.tryton.org/266002/
> > > 
> > > Affected files:
> > >    M trytond/model/modelsql.py
> > >    M trytond/model/modelstorage.py
> > >    M trytond/tests/test_tryton.py
> > 
> > I recently updated this patch to tip. It'd be great if somebody could
> > review it. Most of the code does not require in-depth knowledge of
> > trytond core.
> 
> We talked at the TUL that we should stabilize the API or at least make
> backward compatible changes.
> So I'm wondering if we should not do it for this patch.
> Some options are possible:
> 
>     - allow create to work with a list or a dict. I don't like this
>       solution because we will have the same issue as for
>       write/delete/browse
> 
>     - rename create into create_list and add a method create that
>       convert the dict into a list.
> 
> Or we decide that the change worth the non-backward compatible API
> change.

I know API changes are a pain but I really think this one is worth it for 
performance reasons. Let me show you the results of creating a thousand 
parties and a thousand products (with their templates) in my machine with and 
without the patch (average of three runs) with sqlite:

Parties: 

tip = 4.57 (42% slower than patched version)
patched = 3.22 (70% of tip)

Products:

tip = 32.18 (45% slower than patched version)
patched = 22.25 (69% of tip)

I also tried creating records one by one with the patched version and no 
performance loss was detected compared with tip.

-- 
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