[Gambas-devel] Perfomance differences between gb.gtk and gb.qt components

José Luis Redrejo jredrejo at ...176...
Mon Nov 19 10:00:53 CET 2007


2007/11/19, Benoit Minisini <gambas at ...1...>:
>
> On lundi 19 novembre 2007, José Luis Redrejo wrote:
> > Hi, I'm doing some tests with a pretty complex application made in
> gambas.
> > It has quite a bunch of classes and about one thousand lines of code.
> > I was surprised when I checked the just starting the application and let
> it
> > show the graphical interface, without interacting with it, took a lot of
> > cpu use in a quite powerful computer (checked with the gnome-system
> monitor
> > and later with top), but I was much more surprised when changing from
> using
> > gb.gtk to gb.qt the cpu use was as little as it can not be appreciate,
> so
> > it was around 0.
> > This can be easily appreciated just creating a clean new project with a
> > form, a couple of buttons and a textbox, without adding any code.
> Running
> > it with gb.qt, top only shows gbx2 comsumption at the starting and very
> > fast it disappears from the view, running it using gb.gtk the
> application
> > stays on top of the processes all the time, with about a 4% of CPU use.
> >
> > So, it seems there is some problem with the event loop in gb.gtkcomponent.
> > I think this is a very important bug in order to use gambas under Gnome,
> as
> > many users do.
> >
> > Regards.
>
> Maybe Daniel could give us some details about the gb.gtk event loop.
>
> I noticed that my GTK+ programs were always far slower than my QT
> programs,
> using Gambas or not, so I didn't notice that specific event loop problem.
>

I run mostly gtk programs and can assure you that no one (except firefox
when using the flash plugin) takes 6%-15% of the CPU only by showing its
interface. I don't think the problem is in gtk, but in the gb.gtk component
(well, you can say that gtk makes much harder implementing an event loop but
there are much more bindings to gtk that have not that problem). As you say,
maybe Daniel can enlighten us.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20071119/4f83eae5/attachment.html>


More information about the Devel mailing list