[Spice-devel] [spice-server 03/10] Remove OutgoingHandlerInterface

Christophe Fergeau cfergeau at redhat.com
Mon Feb 13 10:09:55 UTC 2017


On Fri, Feb 10, 2017 at 11:17:44AM -0500, Frediano Ziglio wrote:
> > 
> > On Fri, Feb 10, 2017 at 10:36:10AM -0500, Frediano Ziglio wrote:
> > > So are you saying you prefer an heavy unsafe signal instead of a
> > > function call just for statistics that's disabled by default?
> > 
> > My desktop is built on such signals and works just fine, thank you ;)
> 
> These are patches for spice-SERVER, not spice-DESKTOP, server
> code require more performance and safety, I agree with Gnome
> to use such code for desktop and I'd use too.
> A crash on server is a DoS or a security issue for instance.

Once you tested your code, signals/callbacks are not really a safety
issue, you'd catch fairly quickly memory corruptions related to that...

> About performances GStreamer that use GLib for some stuff recommends
> to not use signals as too slow but allows to register callbacks.

GStreamer has very strict requirement on performance indeed, for some
stuff they have their own GstMiniObject rather than using GObject as
object instantiation was a significant performance hit for them.
In the specific case of stat gathering when sending data on the network,
you probably have a point that we should be careful that this is not too
costly (and g_file_copy_async uses callbacks in a vaguely similar
situation).
However, in the general case, when some of notification is needed, I'd
still use the generic infrastructure which is provided to us by GObject
rather than using callbacks everywhere.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170213/5b7d9816/attachment.sig>


More information about the Spice-devel mailing list