Re: [gtkmm] glademm get_widget_derived
- From: Christer Palm <palm nogui se>
- To: Murray Cumming Comneon com
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] glademm get_widget_derived
- Date: Tue, 16 Sep 2003 20:13:25 +0200
Murray Cumming Comneon com wrote:
From: Christer Palm [mailto:palm nogui se]
If I call Gnome::Glade::Xml::create() more than once on the
same file,
will the XML file be parsed all over again?
Yes, I believe so.
The reason I ask is because the glade docs
(http://developer.gnome.org/doc/API/libglade/gladexml.html#GLADE-XML-NEW)
claims that "Note also that the XML parse tree is cached to speed up
creating another GladeXML object for the same file", but I couldn't find
the code where the caching occurs.
I just wrote a little test program and ran strace on it, and it sure
does appear that this claim is a lie - it _does_ reparse the XML.
Personally I don't optimise without proof that it makes any difference,
particularly when that optimisation just makes life more difficult.
That sure is a sensible standpoint.
I ran some tests and, FYI, it _does_ make a difference. Absolutely
significant for a non-trivial interface. It also takes significant time
to parse the full XML (about 0.4s in my case, but that's on a 2.4GHz
P4), so it should make sense to go the split XML files way, as long as
libglade/libglademm works the way it does today.
--
Christer Palm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]