Re: libeggdbus v. libdbus-glib



On Thu, 2009-09-17 at 12:18 +0200, Denys Vlasenko wrote:
> You wrote:
> > * From: David Zeuthen <david fubar dk>
> > * To: gtk-devel-list gnome org
> > * Subject: EggDBus
> > * Date: Sun, 21 Dec 2008 21:48:25 -0500
> >
> > Hey,
> >
> > For the past 5 weeks or so, I've been working on a new (as compared to
> > dbus-glib) D-Bus binding for GObject. The work on this has finally
> > reached a stage where the code sufficiently complete and documented so I
> > thought I'd send some mail describing it. The code is here
> 
> > http://cgit.freedesktop.org/~david/eggdbus
> 
> Nine months later, some packages already started to use libeggdbus.
> 
> For example, PolicyKit. I got curious (or maybe "appalled") by the number
> of libraries this "simple password prompter lib" pulls in,
> so I looked at it.

If you think polkit is a "simple password prompter lib" you are really
missing the point. The fact that (annoying and useless, I might add)
passwords dialogs can be presented to interrupt the user is just a minor
feature.

> Aside form much other stuff which is not relevant to this email,
> it pulls in libeggdbus directly, and libdbus-glib indirectly:
> 
> # ldd /usr/lib64/libpolkit-gobject-1.so.0
> ...
> 	libeggdbus-1.so.0 => /usr/lib64/libeggdbus-1.so.0 (0x00007fbf5c314000)
> ...
> 	libdbus-glib-1.so.2 => /usr/lib64/libdbus-glib-1.so.2 (0x00007fbf5b3a1000)
> ...
> 
> which made me wonder, how come a replacement for libdbus-glib
> and libdbus-glib itself live in the same program. Ain't that
> code duplication? 

Yes, EggDBus only uses the mainloop integration from dbus-glib. Yes,
there's a reason for why this is so. Yes, the explanation is in the
archives.

FWIW, I don't really know what the long term plan of D-Bus and the GLib
stack is. You should ask the GLib maintainers. FWIW, I've been working
on a new eggdbus-ish dbus library that is here

http://cgit.freedesktop.org/~david/gdbus-standalone

Unfortunately I haven't had a lot of time to work on this lately because
other things are keeping me busy. Ideally we'd put this code in libgio
and be done with it.

> So, your "new D-Bus binding for GObject" is making programs
> use both at once anyway. Also, it is more than twice as big
> as libdbus-glib just by itself:
> 
> # size /usr/lib64/libeggdbus-1.so.0
>    text	   data	    bss	    dec	    hex	filename
>  281912	  10776	    504	 293192	  47948	/usr/lib64/libeggdbus-1.so.0
> 
> # size /usr/lib64/libdbus-glib-1.so.2
>    text	   data	    bss	    dec	    hex	filename
>  128367	   4612	    328	 133307	  208bb	/usr/lib64/libdbus-glib-1.so.2
> 
> 
> I do not know, maybe it presents some significantly nicer C interface
> for the programmer, but on code size front it does not look good.
> 
> Sorry for intruding into your time and basically saying
> that you write bloated code, but I wanted to make you aware
> of this aspect too.

Listen, this "comparison" really makes no sense at all. You are counting
bytes but don't bother to look at the interfaces? FWIW, EggDBus provides
a ton more features than dbus-glib, if you have ever used the latter you
would know why people are unhappy with it and why many people wants to
use something else.

    David




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