Ticket #4932 defect new
PortableGtkReactor I/O significantly slower than other common reactors
|Reported by:||detly||Owned by:|
|Component:||core||Keywords:||gtk2reactor gtk windows|
"Slower under Windows" means both:
- slower than the select reactor or win32 reactor under Windows
- slower than the select reactor or gtk2reactor under Linux
To observe the problem, do the following under Windows (I used XP):
- Run echoserv.py (it will listen on port 31415)
- Run echotest.py - it will use the default reactor, and should run in less than a second
- Uncomment lines 70-71, so that echotest.py uses the gtk2reactor
- Run echotest.py
- The script now takes 110s to run
This kind of slowdown might not be noticed when using a protocol that can just send a large chunk of data and await a small response, but the echotest.py script reflects common usage of serial communications (serial as in, RS232 connected devices): back-and-forth messaging over a long-lived protocol.
That it takes so much longer under Windows means that it is effectively impossible to have a Twisted/GTK application do any kind of fine-grained communication, serial or otherwise. In my actual application, this turned what was previously a 3 minute transfer (using threads and blocking calls) into a 25 hour transfer.