RE: GTK+ 2 speed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Owen Taylor [mailto:otaylor@xxxxxxxxxx] 
> Sent: 28 July 2005 20:22
> To: Robert Thorpe
> Cc: gtk-list@xxxxxxxxx
> Subject: Re: GTK+ 2 speed
> 
> On Wed, 2005-07-27 at 18:22 +0100, Robert Thorpe wrote:
> > Users of PCB are attempting to find out why the GTK+ 
> version gPCB is 
> > slower than the Athena version.  I'm also beginning to write a 
> > graphical program and deciding which widget set to use, so I'm 
> > interested in the same issue.
> > 
> > To help us both, it would be useful if anyone knowledgable on this 
> > list could answer a couple of questions: -
> > 
> > * Are there any general reasons why GTK is slower than other widget 
> > libraries?  Is it in fact slower, or is it just common 
> > mis-configurations?
> 
> GTK+ is slower than Xaw because:
> 
>  - It displays things much more nicely
>  - It has good support for internationalization, accessibility, and
>    many other things that weren't on the radar when Xaw was designed.
>  - It has a much nicer programming interface
> 
> It's a "you get what you pay for" situation, really. Toolkits 
> designed in the late 80's go really fast on today's hardware. 
> On the other hand, they don't do a whole lot.

I understand that to some extent this is inevitable, though Windows does
#1 and #2 of your list and still manages to be fast even on old
hardware. (Windows XP of course doesn't but earlier versions do).

If a program doesn't use the features you mention, like Pango and
Unicode etc will the program go faster?

> Our expectation and experience is that GTK+ performs decently 
> for even complex applications on hardware from the last 5 
> years or so. If your app isn't performing OK, it's probably 
> because you are doing something in particular that is slow.

I'm basing my experiences mostly on using Gnome on Xfree86, not on
anything I've written myself.  I haven't actually started writing the
*nix GUI of the program I mentioned, I'm only planning it.

Gnome doesn't work quickly on my two year old 1.6GHz Duron.  Does anyone
know if is Gnome well designed in this regard?

> One possibility is text measurement ... text measurement is "free"
> in the Xaw universe, so a lot of apps designed for that 
> repeatedly relayout and remeasure the same strings, or 
> measure a huge amount of text in a blocking operation. 
> Profiling may show where your app is having difficulties.

That's a very useful thing to know.

> > * Also, is it true that GTK must handle many events by 
> performing long 
> > string comparison operations?  Does this cause a slowdown?
> 
> String comparison is not a big expense in GTK+ operation.

That's also useful to know.

But, what I was asking was: Does event handling involve long string
comparisons?  Someone told me that is does and this causes problems in
the specific case where you're creating a lot of events.

Thanks for your time.
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux