gtk2 much slower than gtk1 - really !?

Hi all, hi Robin,
I posted this some time ago - and I'm still kinda disappointed that my PyShell
on Linux is now so much slower than it used to be ... see below.
Any idea why gtk2 could be slower than gtk1 ?
Also: how can I build for gtk1 _without_ getting those hundreds of
Gdk-CRITICAL warning when running PyShell ?

Thanks,
Sebastian Haase

···

---------- Forwarded Message ----------

Subject: [wxPython-users] gtk2 much slower than gtk1 - really !?
Date: Thursday 03 November 2005 09:20
From: Sebastian Haase <haase@msg.ucsf.edu>
To: wxpython-users@lists.wxwidgets.org

Hi,
After finally upgrading to from wx2.4 to wx2.6 it seems very slow.
For example in PyShell (in the wxPython demo) when you "import wx" and then
press the '.'-key after 'wx' it now takes maybe 3-4 seconds to show the
popup-list of the module members before it used to be .5 seconds !!
Also general typing (like just holding down a key for some time) seems
noticeably slower.
I'm running Linux (debian stable=sarge) on a P4 1.8MHz 512MB.
I use wxWidgets and wxPython from a recent CVS (first 2.6.0, then 2.6.1)

I suspect that it has to do with the new Gtk2.

What can I do ? Could others (please) confirm this slowdown !?

I tried to build wx with GTK1 but got many warnings like:
Gdk-CRITICAL **: file gdkdraw.c: line 89 (gdk_draw_rectangle): assertion
`drawable != NULL' failed.
Gdk-CRITICAL **: file gdkgc.c: line 713 (gdk_gc_set_clip_region): assertion
`gc != NULL' failed.
...

Thanks,
Sebastian Haase
UCSF

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

-------------------------------------------------------

FWIW, I've seen exactly the same thing with a large wxPython
application that I maintain. Things slowed down significantly
(sometimes to the point of sluggishness) after the upgrade to wxPython
2.6.x. I'm also convinced that this is due to GTK2.

···

On 2/14/06, Sebastian Haase <haase@msg.ucsf.edu> wrote:

I posted this some time ago - and I'm still kinda disappointed that my PyShell
on Linux is now so much slower than it used to be ... see below.
Any idea why gtk2 could be slower than gtk1 ?
Also: how can I build for gtk1 _without_ getting those hundreds of
Gdk-CRITICAL warning when running PyShell ?

below. Any idea why gtk2 could be slower than gtk1 ?

Nice looking fonts come at a certain price :)?

Its not wxPython specific, plain C coded GTK apps feel real slow after
being ported to GTK2 (gtk-gnutella first comes to my mind, GTK2 based
one is practically unusable on older hardware).

Regards
Milos

OK,
thanks for the replies.

I don't care about the fonts - not too much at least :wink:

How can I build the new wxPython with Gtk1 then ??
In my posting I mentioned "hundreds" of Gdk-CRITICAL warning when running
PyShell...

Has anyone built wxPython with Gtk1 and can help !?

Thanks,
Sebastian Haase

···

On Tuesday 14 February 2006 02:33, Milos Negovanovic wrote:

> below. Any idea why gtk2 could be slower than gtk1 ?

Nice looking fonts come at a certain price :)?

Its not wxPython specific, plain C coded GTK apps feel real slow after
being ported to GTK2 (gtk-gnutella first comes to my mind, GTK2 based
one is practically unusable on older hardware).

Regards
Milos

Sebastian Haase wrote:

OK,
thanks for the replies.

I don't care about the fonts - not too much at least :wink:

How can I build the new wxPython with Gtk1 then ??
In my posting I mentioned "hundreds" of Gdk-CRITICAL warning when running PyShell...

Has anyone built wxPython with Gtk1 and can help !?

Follow the build instructions on the website, but for the wxWidgets configure step use --with-gtk=1, and on the wxPython steps add WXPORT=gtk to the setup.py command lines. Be sure to *not* use any unicode flags, or to explicitly disable it.

BTW, there is work going on in the wxWidgets 2.7 development tree to separate the gtk2 and gtk1 C++ code. That will enable a lot of the hacks and workarounds that have been in place to enable the same code to be used with both old and new gtk to finally be removed. The gtk2 version will be migrating to using the newer gtk2 way of doing things, and will hopefully get some performance boosts because of it.

···

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