Improve performance drawing grid