[Glade-users] [glade-users] Using a global variable for GladeXML object?
- From: myaconis at nycap.rr.com (Matthew Yaconis)
- Subject: [Glade-users] [glade-users] Using a global variable for GladeXML object?
- Date: Fri, 19 Jan 2007 12:29:50 -0500
Personally I think storing pointers to the widgets you need at
initialization time is best - but there is also another option,
you can write a lookup_widget_by_name() function that recurses
through the hierarchies of all toplevels searching for the widget
by its name (this is a little suboptimal but maybe makes your
code simpler).
What kinds of performance gains can one expect from switching to either a
global structure of widget pointers or the lookup_widget_by_name function in
terms of saved memory/cpu time?
Is there some "best practices" information available on how to economically
load interfaces using libglade? Most often in the apps I've had to work
with I'll have multiple windows that may or may not be visible all at once,
and I've taken the approach of load once from xml and show/hide as needed.
Thanks for the insights, you've opened my eyes to some performance issues I
wasn't even aware of.
Matt
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]