On 2013-02-28, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote:
> Can anyone explain why this was so painfully slow, and what (if
> anything) I can do to avoid it in the future?

I think your explanation makes sense. Maybe the nested nature of
the strings was causing it to churn looking for circular
references?

Disabling gc before exiting might do the trick, assuming you're
assiduously managing other resources with context managers.

gc.disable()
exit()


-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to