Python and Sockets,
Chris Liechti
cliechti at gmx.net
Thu Aug 1 14:32:00 EDT 2002
John J Breen <jbreen at nospam.com> wrote in
news:3D497A75.81D9003F at nospam.com:
> Chris Liechti wrote:
>
>> you'll probably want to look at the threading module. to learn about
>> threads, you can look at the slides on Aahz page:
>> http://www.pythoncraft.com/
>
> I have looked into using threading and I have tried starting a thread
> for the different components. It works but for some reason it makes
> the interfaces *much* slower than they usually are. For instance, if I
> type into a text widget it takes a long time for the display to catch
> up and show the characters I typed in. Any suggestions or ideas on why
> this might be happening?
do you have a thread that consumes all the CPU cycles? e.g. if you read
from sockets, you should use blocking IO to avoid processing empty strings
all the time.
(you could temporary place a print statement in all your loops in the
threads, to find out which one is running all the time.)
chris
--
Chris <cliechti at gmx.net>
More information about the Python-list
mailing list