Calling vertexArray.length() once