Re: [gtk-list] Re: [patch] gtkviewport optimizations




Patrice Fortier <Patrice.Fortier@aquarel.fr> writes:

> I think this was a choice to optimize the number of windows 
> created. In an other hand I'm pretty sure that it'll bring some problems
> on us sooner or later.
> If Raster is reading this, he must be jumping on his seat like a
> kangooroo (don't know the spelling in australian :)).
> I don't consider thatit's safe for a widget to draw in an other one.

Safety is not an issue. GTK was designed from the ground up
to let widgets draw in their parent's window. Raster doesn't
like it, because he likes setting background pixmaps all over
the place. But even if we concede to that, there are still some
widgets (like labels) that still could usefully draw in their
parent's window.

> Forget the second part of my patch.
> In the current implementation I'm just plain wrong.
> 
> Question: 
> Does anybody know about multiple-window overhead or about mapping/
> unmapping windows when they're not on the screen?
> If we can find a clean and *fast* solution to this... "problem" :)

I don't know what you mean by the second. Mapping and unmapping
pretty much means putting windows on/off the screen. The
overhead per window is relatively small. I measure it at about
1.5msec/window on my machine (P133) with X running locally.
But that includes about 3 messages either way from client to
server, so if you are running X remotely...

But a GTK application may include quite a few widgets. I think it would
be very much noticeable for the GIMP if we removed the NO_WINDOW
features of GTK. (even running locally) Many people (Peter especially)
would be quite unhappy.

Also, there is extra memory overhead on the server side. (I don't
know how much)

Out of the list of NO_WINDOW widgets in the tutorial: (hmmm that needs
some fixing, GtkViewport, GtkItem, don't belong there; and there are
some other widgets like the BBox widgets that need to be added. Plus I
don't think base widgets (like Box) were meant to be in the list.)

GtkArrow, GtkImage, GtkLabel, GtkPaned, GtkPixmap, GtkAspectFrame,
GtkFrame, GtkVPaned, GtkHPaned GtkVSeparator, GtkHSeparator

draw in their parent's window, while:

GtkAlignment, GtkVBox, GtkHBox, GtkTable, GtkScrolledWindow

Don't. For doing themes with background pixmaps that would have to
change for GtkAspectFrame, GtkFrame, G[HV]Separator. The paned widgets
would need special treatment, as would the Arrow widget.

Regards,
                                        Owen



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