[Glade-users] why using libglade is better...

On Mon, 18 Oct 2004 10:33:51 -0600, Neil Zanella <nzanella gmail com> wrote:
Thank so much you for your insightful reply,

My main window has a really large number of widgets (in fact I use a notebook,
that is why it is so large). When I compiled it, it took about 20
minutes. That was
just to compile the user interface alone. But when I use glade, which
I assume uses
libglade, the widgets show up almost immediately. That is a time savings so huge
that if I were to tell anyone nobody would even believe me, but that's just how
much better it is.

Now what I want to ask then is, I've got several popup widgets besides the main
window. I need to connect these to buttons and menu selections that that make
them show up on the screen...

So should I make a separate file for each popup widget?

    consider that if you load them in one xml file then you will have a larger 
xml tree at runtime, ofcourse, after you are done with the GladeXML
object it shouldn't make any difference (unreffing the GladeXML should
free all resources and leave you with a functioning widget hierarchy), If you
want to re-create the popups every time you use them then you'll need to
seperate them into seperate glade files, this way you will gain on RAM
but loose on CPU (because your program will have to reload the glade file
every time for your popup).

    In my environment (an embedded jukebox system), we use one glade file
for each user "screen", and one glade file that we call "popups.glade", this 
makes sence from a CM's point of view as it is easy to manage and from an
implementation point of view it makes no difference because we keep all
widgets loaded in memory to reduce latency in the UI.


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