[wxpython-users] Profiling of wxApp shows XRC a real hog
Frank Aune
Frank.Aune at broadpark.no
Tue Apr 22 01:53:40 PDT 2008
Hi,
I've been toying with the hotshot profiler lately, and looking at the 3 most
expensive calls in my wxApp, reveals that XRC is a real resource hog:
20802 function calls (20567 primitive calls) in 9.110 CPU seconds
Ordered by: internal time, call count
List reduced from 851 to 40 due to restriction <40>
ncalls tottime percall cumtime percall filename:lineno(function)
3 5.709 1.903 5.745 1.915 xrc.py:75(__init__)
7 0.779 0.111 0.779 0.111 xrc.py:139(LoadPanel)
4 0.198 0.050 0.198 0.050 _gdi.py:6097(GetFont)
23 0.191 0.008 0.191 0.008 _gdi.py:515(__init__)
209 0.085 0.000 0.086 0.000 _controls.py:4519(SetStringItem)
2 0.079 0.039 0.079 0.040 _core.py:8841(Show)
As you can see, the startup was over 9 seconds (!) - normally it only takes
3-4, but occationally it takes as long as the profile above indicates. I
don't want to drop using XRC, as I like wysiwyg for GUI editing. But is there
anything I could try to increase the performance?
Can I for example generate pure python code from XRC, without relying on the
xml?
More information about the wxpython-users
mailing list