[Gtk-sharp-list] Increesing glade-sharp speed
Todd Berman
tberman@sevenl.net
Fri, 17 Oct 2003 08:46:35 -0400
Just from your crossplatform advocate here, please only do this if it
will continue to work on win32.
I know that making the gtk-sharp libs working on windows is an active
effort, but getting glade-sharp working on windows is a relatively new
feature as far as I know.
Please don't break this for some (marginal) memory savings.
--Todd
> -----Original Message-----
> From: gtk-sharp-list-admin@lists.ximian.com [mailto:gtk-sharp-list-
> admin@lists.ximian.com] On Behalf Of Miguel de Icaza
> Sent: October 16, 2003 10:18 PM
> To: Pablo Fischer
> Cc: gtk-sharp-list@lists.ximian.com
> Subject: Re: [Gtk-sharp-list] Increesing glade-sharp speed
>
> Hello,
>
> > Ok, the output of mono --profile mBloggy.exe prints this methods and
the
> > memory used by each one:
> >
> > 292 KB Glade.XML::.ctor(Assembly,string,string,string)
> > 220 KB System.Collections.ArrayList::.ctor()
> > 99 KB System.Array::CreateInstance(Type,int)
> > 66 KB System.Xml.XmlConstructs::.cctor()
> > 52 KB
> > System.Collections.Hashtable::.ctor(int,single,IHashCodeProvider,ICo
> > mparer)
> > 49 KB
> > System.MonoCustomAttrs::GetCustomAttributes(ICustomAttributeProvider
> > ,Type,bool)
> >
> > So..
> > Total memory allocated: 1163 KB
> >
> > I know it maybe sounds stupid to think in decreasing that use of
memory
> > (for example, to use less than 1000 KB). But, the Glade.XML it's
using
> > 292 KB, is it normal to use that memory just for loading the file?
>
> With the current implementation, it is correct. This is used as a
> temporary block of memory to load the glade file, and then pass that
to
> glade routines.
>
> This is a good catch, because there is an API call that we could use
in
> this case. I say we could, because it is an internal call in corlib
> that is not exposed to the world (in fact, its what is used by the
> stream returned inside this constructor).
>
> I do not know of a clean way of dealing with this though
>
> Miguel.
> _______________________________________________
> Gtk-sharp-list maillist - Gtk-sharp-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list