That code was HORRIBLY made It would be easy to remake that which would run at roughly 50fps I'm guessing the programmer chose to generate the world the same time it draws it, which is why it's so slow