A Saturday 11 August 2007, Francesc Altet escrigué: [snip] > When doing this, it is also more efficient to use: > > row = table.row > for i in xrange(1000): > row.append() > table.flush() > > than: > > for i in xrange(1000): > table.row.append() > table.flush() > > because in the latter a new Row object is instanciated on each > iteration, but in the former only once (see tutorials).
Ops, it is not true that using table.row in the middle of a loop is going to instantiate Row in each iteration. I've forgot that it is a lazy attribute that creates the Row instace during the first call and then caches it for the next ones. Sorry about the confusion. At any rate, flushing rows by bunches is always *strongly* recommended. Cheers, -- >0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-" ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users