Another crucial tip if you do a lot of custom drawing, is to use collections instead of calling draw functions per object. This radically speeds up drawing. For example using PolyCollection to draw a big bunch of polygons, then LineCollection, EllipseCollection etc.