Hi guys,
I have a question that I still don’t get. Why is Rhino so very slow at running this script?
import rhinoscriptsyntax as rs
import random
for i in range(20):
for ii in range(20):
n=random.random()
rs.AddPoint(i,ii,n)
Rhino populates slowly one-by-one for a while then jumps to the end all done, in about 5 seconds.
If I add rs.EnableRedraw(False) to it then it takes just 0.09 seconds.
AND if I add a rs.Redraw() in there then it take a whopping 40 seconds!
import rhinoscriptsyntax as rs
import random
import time
time1=time.time()
rs.EnableRedraw(False)
for i in range(20):
for ii in range(20):
n=random.random()
rs.AddPoint(i,ii,n)
rs.Redraw()
rs.EnableRedraw(True)
print time.time()-time1
So why doesn’t it take just over 0.1 seconds to redraw each new point?