Help with optimisation

2007-08-13 Thread special_dragonfly
Hello, I know this might be a little cheeky, and if it is, please say, but I need a little hand optimising some code. For the simple reason that this is 'company' code and I have no idea what I'm allowed to release and not as the case may be I've changed anything that could give an indication

Re: Help with optimisation

2007-08-13 Thread Alex Martelli
special_dragonfly [EMAIL PROTECTED] wrote: ... dom=xml.dom.minidom.parseString(text_buffer) If you need to optimize code that parses XML, use ElementTree (some other parsers are also fast, but minidom ISN'T). Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with optimisation

2007-08-13 Thread Bruno Desthuilliers
special_dragonfly a écrit : Hello, (snip) The function doesn't return anything, but it's called often enough and depending on the optimisation I'll be able to use the same style in other areas of the program. previous code: def CreatePerson(text_buffer):

please help with optimisation of this code - update of given table according to another table

2006-11-08 Thread Farraige
Hi I need your help... I am implementing the method that updates given table (table is represented as list of lists of strings) according to other table (some kind of merging)... This method takes following arguments: t1 - table we would like to update t2

Re: please help with optimisation of this code - update of given table according to another table

2006-11-08 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Farraige wrote: Let's say we have a table T1: A B C D E --- 1 4 5 7 7 3 4 0 0 0 and we call a method mergeTable(T1, T2, [0,1], [2,4]) It means that we would like to update columns C and E of table T1 with data from table T2 but only in case the

Re: please help with optimisation of this code - update of given table according to another table

2006-11-08 Thread Antoon Pardon
On 2006-11-08, Farraige [EMAIL PROTECTED] wrote: ... The main part of my algorithm now looks something like ... merge(t1, t2, keyColumns, columnsToBeUpdated) ... for row_t1 in t1: for row_t2 in t2: if [row_t1[i] for i in keyColumns] ==

Re: please help with optimisation of this code - update of given table according to another table

2006-11-08 Thread Gabriel Genellina
At Wednesday 8/11/2006 07:18, Farraige wrote: for row_t1 in t1: for row_t2 in t2: if [row_t1[i] for i in keyColumns] == [row_t2[j] for j in keyColumns]: # the keys are the same for colName in columnsToBeUpdated: