3.cdn:~# python -m profile fix.py 1143863539 481 function calls (478 primitive calls) in 0.700 CPU seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 23 0.000 0.000 0.000 0.000 :0(append) 100 0.000 0.000 0.000 0.000 :0(chr) 1 0.000 0.000 0.000 0.000 :0(close) 1 0.000 0.000 0.000 0.000 :0(compile) 1 0.000 0.000 0.700 0.700 :0(execfile) 2 0.000 0.000 0.000 0.000 :0(extend) 1 0.000 0.000 0.000 0.000 :0(get) 3 0.000 0.000 0.000 0.000 :0(isinstance) 1 0.000 0.000 0.000 0.000 :0(items) 2 0.000 0.000 0.000 0.000 :0(iteritems) 30/29 0.000 0.000 0.000 0.000 :0(len) 4 0.000 0.000 0.000 0.000 :0(min) 2 0.000 0.000 0.000 0.000 :0(ord) 1 0.000 0.000 0.000 0.000 :0(read) 252 0.690 0.003 0.690 0.003 :0(replace) 1 0.000 0.000 0.000 0.000 :0(setprofile) 1 0.000 0.000 0.000 0.000 :0(sub) 1 0.000 0.000 0.000 0.000 :0(write) 1 0.000 0.000 0.700 0.700 :1(?) 1 0.010 0.010 0.700 0.700 fix.py:1(?) 1 0.000 0.000 0.000 0.000 htmlentitydefs.py:1(?) 1 0.000 0.000 0.700 0.700 profile:0(execfile('fix.py')) 0 0.000 0.000 profile:0(profiler) 1 0.000 0.000 0.000 0.000 sre.py:136(sub) 1 0.000 0.000 0.000 0.000 sre.py:213(_compile) 2/1 0.000 0.000 0.000 0.000 sre_compile.py:27(_compile) 1 0.000 0.000 0.000 0.000 sre_compile.py:349(_simple) 1 0.000 0.000 0.000 0.000 sre_compile.py:356(_compile_info) 2 0.000 0.000 0.000 0.000 sre_compile.py:469(isstring) 1 0.000 0.000 0.000 0.000 sre_compile.py:475(_code) 1 0.000 0.000 0.000 0.000 sre_compile.py:490(compile) 4 0.000 0.000 0.000 0.000 sre_parse.py:126(__len__) 5 0.000 0.000 0.000 0.000 sre_parse.py:130(__getitem__) 1 0.000 0.000 0.000 0.000 sre_parse.py:132(__setitem__) 1 0.000 0.000 0.000 0.000 sre_parse.py:134(__getslice__) 3 0.000 0.000 0.000 0.000 sre_parse.py:138(append) 3/2 0.000 0.000 0.000 0.000 sre_parse.py:140(getwidth) 1 0.000 0.000 0.000 0.000 sre_parse.py:178(__init__) 8 0.000 0.000 0.000 0.000 sre_parse.py:182(__next) 2 0.000 0.000 0.000 0.000 sre_parse.py:195(match) 6 0.000 0.000 0.000 0.000 sre_parse.py:201(get) 1 0.000 0.000 0.000 0.000 sre_parse.py:301(_parse_sub) 1 0.000 0.000 0.000 0.000 sre_parse.py:374(_parse) 1 0.000 0.000 0.000 0.000 sre_parse.py:658(parse) 1 0.000 0.000 0.000 0.000 sre_parse.py:67(__init__) 2 0.000 0.000 0.000 0.000 sre_parse.py:90(__init__)