Python: performance, footprint, multi-threading, etc.

Tim Browse timb at tdv.com
Mon May 24 11:24:51 EDT 1999


Alexander Staubo wrote:

> As for your multithreading statement: 50-100 threads? Read up on threading! If
> you're even considering loading this much on any scheduler, including NT, then
> you're not up to scratch.

I just ran Process Viewer on this Windows 98 machine, which reveals that
it's running in excess of 80 threads at the moment.  It doesn't feel
slow.  It's not heavily loaded - I'm running an emailer, nesgroup reader
and HTML editor.

I do know about multi-threading, thanks all the same.  You misread my
message - or I constructed the question poorly.  I thought I made it
quite clear that I wasn't expecting to do this at the system thread
object level.

> For example, if most of your threads are sleeping,
> why are they running in the first place?

Um, because they need to be...I don't understand the question.

For example, most of the threads on this Win98 box are sleeping/inactive
- but that doesn't mean they don't have to be maintained by the process
scheduler.  They can't just be thrown away - something has to wake them
up when they are needed.

> And even if 90% of your threads are
> sleeping, the context-switch hit and CPU load will bring your system to its
> knees very quickly.

Counter-example: the game "Unreal".  It does precisely what I'm
describing.  It seems quite fast.

Thanks for the other info.  I'm coming to the conclusion that Python is
probably too complete/sophisticated for (some of) my purposes, at least
on this project.

Tim
--
Tim Browse
Tech Lead/Honesty Evangelist
The Digital Village
timb at tdv.com




More information about the Python-list mailing list