Timed events
Erik Max Francis
max at alcyone.com
Sat Feb 1 04:41:35 EST 2003
News M Claveau /Hamster-P wrote:
> i have a problem with 'time.sleep( )' on a NT-server. Considere this
> code :
>
> for i in range(0,999999):
...
> When this script run, NT give, with performer analysis : Time-CPU at
> 100%
> if i stop the script the Time-CPU go to 0%
Well, for one thing, you're building a list with nearly a million
elements. Don't do that. Use
for i in xrange(0, 999999): ...
instead.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Nothing you have said / Is revelation
\__/ The Russian, _Chess_
CatCam / http://www.catcam.com/
What do your pets do all day while you're at work? Find out.
More information about the Python-list
mailing list