question about perfs

Francois Girault wrote:

Hi all,

I'm programming a database client with wxPython.

I'm generating dynamic forms, and the gui part of the process is
slow.

My forms looks like that :

- a panel, containing rowcolsizer with 10~15 static texts

- a scrolled panel, with a hbox containing 4~10 rowcolsizers with
5~15 rows with 4 static texts, 3 buttons and 1 textctrl per row.

on a p4 1.8 GHz (linux 2.4, python 2.3.1, wxPython 2.4.1.2), data
retriving from database takes 0.6 sec and gui building takes often
more that 4 sec...

Any idea (or, better, docs) about profiling perfs of wxPython app ?
Is there specifics design patterns ?

Hav eyou tried using the Python profiler?

Or can someone tell it isn't anormal ?

Yes, wxRowColSizer can be slow, but I wouldn't expect it to be this bad... It will be ported to C++ in 2.5 but that won't help you now. Probably the best thing is to either switch to a different layout mechanism or do some profiling in the wxRowColSizer Python code and see if there are ways to improve it.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hav eyou tried using the Python profiler?

sure !

Ordered by: cumulative time
   List reduced from 587 to 20 due to restriction <20>

   ncalls tottime percall cumtime percall filename:lineno(function)
     ... ... .. .. .. ......
     1982 1.550 0.001 9.990 0.005 rcsizer.py:113(CalcMin)
     ... ... ... ... .. .......
    32250 2.220 0.000 3.350 0.000 rcsizer.py:92(_add)

compared to other calls, these two are more cpu consuming.

>
> Or can someone tell it isn't anormal ?

Yes, wxRowColSizer can be slow, but I wouldn't expect it to be this
bad... It will be ported to C++ in 2.5 but that won't help you now.
Probably the best thing is to either switch to a different layout
mechanism or do some profiling in the wxRowColSizer Python code and see
if there are ways to improve it.

Damned !

I've searched in the wxWindows 2.5 documentation (http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/docs/wxwin.htm) and haven't seen anything about wxRowColSizer.

I've tried about testing 2.5 release, but I can't figure how to download it (there's no WX_2_5_BRANCH in the CVS)

Thanks for your help.

···

On Mon, 29 Sep 2003 15:08:53 -0700 Robin Dunn wrote:

Francois Girault wrote:

compared to other calls, these two are more cpu consuming.

If you have some time please see if you can find a way to optimize these two methods. (If you need to use features sepecific to Python 2.2+ then that is okay.) Otherwise I'm not sure when I will be able to get to it.

Yes, wxRowColSizer can be slow, but I wouldn't expect it to be this
bad... It will be ported to C++ in 2.5 but that won't help you now. Probably the best thing is to either switch to a different layout mechanism or do some profiling in the wxRowColSizer Python code and see if there are ways to improve it.

Damned !

I've searched in the wxWindows 2.5 documentation (http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/docs/wxwin.htm) and haven't seen anything about wxRowColSizer.

Because it hasn't been done yet, but it is on the roadmap.

I've tried about testing 2.5 release, but I can't figure how to download it (there's no WX_2_5_BRANCH in the CVS)

2.5 is the main trunk (or HEAD) of the CVS tree so just check out
without a tag.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!