In message <[EMAIL PROTECTED]>, Steven D'Aprano <[EMAIL PROTECTED]> writes >But the real killer is this one line: > >row=row+chr(num/64) > >Bad, bad BAD idea. Every time you add two strings together, Python has to >copy BOTH strings. As row gets huge, this takes longer and longer to do. > >A rule of thumb I use is, never add more than two strings together. Maybe >three. Certainly not more than four. Or five. > >But absolutely not millions of strings, which is what you are doing.
You would be able to visualize this process very well using Python Memory Validator and Python Performance Validator. http://www.softwareverify.com Stephen -- Stephen Kellett Object Media Limited http://www.objmedia.demon.co.uk/software.html Computer Consultancy, Software Development Windows C++, Java, Assembler, Performance Analysis, Troubleshooting -- http://mail.python.org/mailman/listinfo/python-list