[Glade-users] gtk builder and large glade files



HI -- can someone tell me if gtkbuilder keeps any sort of cache of
objects it builds via the add_from_file and add_from_source methods
and how that works?

Here's what I'm thinking about.  I'm converting a libglade project to
gtkbuilder.  So far, so good.  My main challenge lies ahead, a 600k
glade file with almost 40 top levels that is used by 20 or so modules.
 Each module does a call to glade.XML to extract its widgets.  This
works fine but I'm concerned about a couple of things:

1. is the entire glade file reread every time glade.XML is called?  I
hate to think that a 600k file is read 20 times in one application.
So does libglade and will gtkbuilder cache the objects it has built at
all or reread the file each time?

2. If I do one initial call to gtkbuilder add_from_file, followed by
several get_object calls, is there a method to clone a toplevel object
with all its children?  If so, I could create a master for each object
in a glade file, then make copies from it as needed.

PS I'm trying to go slowly with breaking up the master glade file so
as to minimize the impact to the application's modules.

-- 
Gerald Britton




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