Reorder line drawing of grid to speed it up.