[Glade-devel] libglade ideas

Ivan Wong email@ivanwong.info
Thu, 08 Apr 2004 15:51:52 +0800


I believe that it isn't just a matter of size, but the efficiencies of
parsing an un-compiled source and pre-complied binary. For development, we
of course like to use "ready to edit" text .glade files. But for production
release, I think I do welcome the pre-compiled form of .glade files which
improves the efficiency of repated loading of some frequently used forms
(which I also don't want them to be just invisible and reside in the memory
when unused).

----- Original Message ----- 
From: "Olexiy Avramchenko" <olexiy@irtech.cn.ua>
To: "todd" <taf2@lehigh.edu>
Cc: <glade-devel@ximian.com>
Sent: Thursday, April 08, 2004 3:10 PM
Subject: Re: [Glade-devel] libglade ideas


> todd wrote:
>
> > Hi all,
> >    I'm building an application that is relying heavily on libglade and
> > another xml binding.  I've noticed that because every part of the UI is
> > built using glade and loaded using libglade that there is a noticeable
> > performance lag in loading the .glade files.  To give you an idea of the
> > size of these interface files here is a line count.
> >
> >    195 simo-attached-documents.glade
> >   1030 simo_calendar_view.glade
> >    202 simo_dialogs.glade
> >   1306 simo_event_view.glade
> >    278 simo-fsa-msa-hsa-reimbursements-eob.glade
> >   3314 simo.glade
> >   1799 simo-home-view.glade
> >   1305 simo-person-med-visit-detail.glade
> >    101 simo-person-med-visit-summary.glade
> >    100 simo-person-summary.glade
> >   1009 simo-person-view.glade
> >    563 simo-plan-reimbursements-eob.glade
> >    152 simo_plan_view.glade
> >    158 simo-provider-payments.glade
> >    343 simo-sidebar-dialogs.glade
> >  11551 simo-wizards.glade
> >  23406 total
> >
> > I'm not loading them all at once; In fact I only load them once and
> > only when that part of the UI is requested.  My idea is to provide a
> > method for
> > dumping the .glade into a binary format.  after looking into the
> > libglade source it looks like it could be possible to bipass the xml
> > parse code if this
> > binary file exists and then just fread the data into the libglade hash
> > tables.  This should improve the load time by reducing the disk io.
> > (I think).
>
> Just compress your glade xml files with gzip if you want to reduce disk
> io. Libglade and glade UI builder works well with compressed xml files.
>
> > I also learned that this is not an original idea; it is in fact very
> > similar to what mozilla has done to improve its startup performance
> > with xul.  I thought
> > this would be something libglade would benefit from and that it would
> > be good for me to bring this up on the list.
> >
> > Has anyone started work on something like this?  If not i'd like to
> > start work on it and get as much input as possible about different
> > ways to approach
> > this.
>
> You can edit text/xml file with any editor from vi to MS Word and
> compressed text will take less space than parsed binary file, I beleive.
>
> http://www.catb.org/~esr/writings/taoup/html/textualitychapter.html
>
>     Olexiy
>
> _______________________________________________
> Glade-devel maillist  -  Glade-devel@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/glade-devel