Python 3.x turtles extremely slow?
Turn off the drawing delay:
turtle.delay(0)
and hide the turtle:
terry.ht()
Turning off the drawing delay is the big one. If you don't do that, there's a 10-millisecond pause whenever the turtle moves.
If you want it to go even faster, and you only care about the finished picture, you can turn off screen updates entirely:
turtle.tracer(0, 0)
and call update
a single time when your turtle has executed all its commands:
terry.update()
With tracing off and a manual update
call, the program finishes near-instantaneously on my machine.
Here’s a quick copy-paste for anyone looking. Credits to @user2357112
Use these methods to greatly speed things up and get right to the end result:
.speed(0).delay(0).ht().tracer(0, 0)#code goes here.update()