Re: gtk 1.2 and gtk 2.4



On Mon, 2005-03-07 at 15:41 -0800, Xiaodong Zhou wrote:
> Hi Owen,
> 
> > > Hello,
> > > 
> > > C/C++ interpreter Ch has bindings to GTK 2.4.
> > > We noticed that the speed of running GTK application in Ch is very slow. 
> > > However, the speed for bindings to GTK 1.2 is fine. 
> > > 
> > > The reasons I noticed is that the header files in the new release (2.4)
> > > contains many internal functions. They are too big and takes
> > > too much time to interprete in Ch.
> > 
> > There are almost no internal functions in the GTK+ header files that
> > I'm aware of. (A quick grep though the GTK+ headers reveals about
> > 100 functions starting with _gtk as compared to about 2700 public
> > entry points. So, a very small fraction.)
> > 
> > GTK+-2.x is a much more complex system than GTK+-1.2; there really
> > isn't much of a way around that... it's bigger because it does 
> > more. 
> > 
> > To use it from an interpreter, you'll have to figure out some way
> > of quickly processing the 42,000 lines of header files. (Up from
> > around 22,000 in GTK+-1.2)
> 
> I use "wc glib/* gdk/* gtk/* ", there are about 100,000 lines of header
> files for GTK 2.4. 

The appropriate number of lines of header files is based on the
header files that are *installed*. If you count lines uninstalled
you'll count things like lib/glib/gunichartables.h -- 
11,000 lines of Unicode property data structures.

If you are actually following #include lines, then these headers
shouldn't get included, so probably aren't the reason for your 
problems.

> So you mean there are almost no internal functions/structures in 
> GTK+ header files?
> 
> It appears that msft's VC++  header files
> only contain external functions and
> structures, macros only
> for Windows API, not for internally ones

Please site an example of things in the *installed* header files 
that you think are private. I'm not aware of such.

> In X11/Motif,the private one header files are used as
> XXX_p.h, which corresponds to XXX.h.
> Application developers and programs do not need XXX_p.h.
> They are not distributed for application developers.
> 
> The GUI C applications using X11/Motif, Win32 API can be handled 
> without execution speed problem in Ch. Not sure if GTK+ can have
> smaller header files? 

windows.h doesn't define a full toolkit on the same scale as GTK+.
Motif is also pretty limited compared to GTK+.

Regards,
						Owen





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