On December 11, 2009, Michael Bayer wrote:
> 150K is an enormous amount to send through the ORM.  you probably want to
> at least call flush() every 1000 objects or so to reduce the size of each
> flush plan - allocating memory for a 150K dependency tree alone is
> probably taking a significant amount of time.

My first approach was to commit() every 1000 objects but it turned out
to be counter productive.  However, doing a flush() every 1000 objects
does help.  On average, I get a 10% to 20% speedup.  I guess that this
is the fastest that it will get so I should now move to implement a
decent DB migration strategy instead of focusing on having a very fast
bootstrap system.

 :-)

Thanks for the help!

-- 
Yannick Gingras
http://ygingras.net
http://confoo.ca -- track coordinator
http://montrealpython.org -- lead organizer

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to