[Twisted-Python] Gtk2Reactor: what are the reasons for avoiding GLib functions?

Jason Heeris jason.heeris at gmail.com
Tue Apr 5 01:08:53 MDT 2011


I'd like to try and get to the bottom of the various problems with
Twisted + GTK + Windows (mainly issue #4932[1], but see also issues
#4376[2], #4862[3], #1759[4]).

On issue #4376 there's a comment from Exarkun:

"glib handles timeouts much less efficiently than any of the existing
Twisted reactors. Letting glib take care of these would probably make
the glib-based reactors unusable for applications with many timeouts."

Is there a benchmark or piece of code somewhere that verifies this (or
at least gives some sort of demonstration of "unuseable")?

If not, is there some alternative implementation lying around in
version control that tried to use GLib's mainloop functions and was
thrown out for performance reasons?

I ask because my first approach to fixing this would be to ignore
what's already there and try to write something that's quite closely
coupled to the GLib/GTK mainloop. But it sounds like this was already
tried and abandoned, and I want to be able to make sure I'm not (a)
writing something that was already written, or (b) performs too poorly
to be of any use. It would be good to have a metric available.

Cheers,
Jason

[1] http://twistedmatrix.com/trac/ticket/4932
[2] http://twistedmatrix.com/trac/ticket/4376
[3] http://twistedmatrix.com/trac/ticket/4862
[4] http://twistedmatrix.com/trac/ticket/1759




More information about the Twisted-Python mailing list