Hi, 

im trying to make my script as efficient as possible. I have placed all these 
lines in my code to see how fast different sections are running and then just 
focusing on those areas. 

###########################
t0 = time.clock()

print time.clock() - t0
###########################

The problem is certain areas seem to take a long time when they have no need to.

there is a loop in my script that just finds four points in space:
                                                        
pnt1=cmds.pointPosition('curve5.ep[2]')                                         
        pnt2=cmds.pointPosition('curve5.ep[4]')                                 
                pnt3=cmds.pointPosition('curve5.ep[5]')                         
        pnt4=cmds.pointPosition('curve5.ep[6]')

but the very first time the first line is called, the program takes 0.5 seconds 
to complete, but then every time it loops through again it takes 0.0001 seconds 
to complete. Can anyone explain why this might be. really confusing. I presume 
it maybe loading curve into memory or something? dunno

thanks, 
Sam

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/e7373880-cf36-4835-ad81-ca5d9d6e31fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to