robhudson/zamboni — comment on commit 31d111a7bf68fb482c98674b57a128d3ef0efcfe
File: services/update.py line 215
By kumar303:

sort of a micro optimization but it's faster to make a list, append to the list, then create the final string at the end with ``''.join(sql_list)``. That's because Python strings are immutable. At the scale we're running this code, I think it would be worthwhile to use a list. Here are some measurements http://www.skymind.com/~ocrow/python_string/