Re: GNOME: lack of strategic roadmap



On Tue, 2010-02-23 at 13:20 +0100, Alberto Garcia wrote:
> On Mon, Feb 22, 2010 at 09:37:46PM +0000, Martyn Russell wrote:
> 
> > > seems gtk+'s object model overhead (for example, object method
> > > invocation) is too high, especially visible on mobile platforms...
> > > it should be possible to optimize to reduce this overhead...
> > 
> > I agree with Emmanuele.
> > Please provide evidence when making wild accusations.
> 
> Admittedly the run-time type checking in GObject adds some overhead,
> and it's not hard to see g_type_check_instance_is_a() among the most
> called functions.

This check isn't strictly necessary for object method invocation (which
is what Andy was talking about).

Especially if your high-performance class isn't using the macro
G_TYPE_INSTANCE_GET_PRIVATE but instead has a pointer to the private in
its `GObject *parent' struct.

The "I'm feeling lucky Google" for that is:

http://sigquit.wordpress.com/2009/02/13/avoid-g_type_instance_get_private-in-gobjects/

> However during my work in Maemo I have *never* seen that being
> an actual problem. When there is a performance problem directly
> noticeable by the end user the root cause is elsewhere (which may
> include, of course, other parts of GTK).

Right

> Now, this probably doesn't have much value anymore, but as a funny
> side note I even remember back in 2000 or so that a friend of mine
> compared the performance of a C-based object system (inspired by GLib)
> with that of C++, and -to my surprise back then- found out that the
> former was noticeably faster.

To my surprise can in some cases virtual machines be faster than native
code at certain tasks, including their object system. Well, not to my
surprise as for many of them it's explained how this works.

It's fun to use as a counter argument when yet again one of those
ranting anti virtual machine people comes along.


Cheers,

Philip


-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be



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