So, if you run something like the following through manhole:
def spam(n=300): for i in xrange(n): print "iiIiiIiI", i
spam()
the whole mess comes back when the command has finished completion, and receiving that much data seems to take the protocol-decoder a while to decode. Long enough that it can cause a hiccup, or outright stall, in the GUI. So it might be nice to do that processing in incremental bit so it shares time better. In twisted.python terms, it'd be in a Looping construct, or in GTK terms, you'd add it on an idle handler.
Gurgf. My brain, it is not doing the thinking at this time, so this post just is to say "don't forget about this; put it on the TODO list or something."
Kevin Turner wrote:
So, if you run something like the following through manhole:
def spam(n=300): for i in xrange(n): print "iiIiiIiI", i
spam()
the whole mess comes back when the command has finished completion, and receiving that much data seems to take the protocol-decoder a while to decode. Long enough that it can cause a hiccup, or outright stall, in the GUI. So it might be nice to do that processing in incremental bit so it shares time better. In twisted.python terms, it'd be in a Looping construct, or in GTK terms, you'd add it on an idle handler.
Or, you could return a Deferred and dispatch the action to be done by a ThreadDispatcher.