Graphics.RenderMesh in editor

Currently I am rendering mesh in unity editor using

EditorApplication.update += DrawMesh;

private void DrawMesh()
{
    var rp = new RenderParams(material);
    Graphics.RenderMesh(rp, _input, 0, _matrix);
}

However, this causes a very high overdraw count, and lag when camera move closer to the mesh.

Fix it by change the code to:

SceneView.duringSceneGui += DrawMesh;

private void DrawMesh(SceneView sceneView)
{
    if (Event.current.type == EventType.Repaint)
    {
        var rp = new RenderParams(material)
        {
            camera = sceneView.camera,
            layer = layerMask
        };
        Graphics.RenderMesh(rp, _input, 0, _matrix);
    }
}