Github user jorgebay commented on a diff in the pull request:

    https://github.com/apache/tinkerpop/pull/712#discussion_r140812056
  
    --- Diff: gremlin-dotnet/glv/GraphTraversal.template ---
    @@ -65,9 +65,17 @@ namespace Gremlin.Net.Process.Traversal
             /// <summary>
             ///     Adds the <%= method.methodName %> step to this <see 
cref="GraphTraversal{SType, EType}" />.
             /// </summary>
    -        public GraphTraversal< <%= method.t1 %> , <%= method.t2 %> > <%= 
toCSharpMethodName.call(method.methodName) %><%= method.tParam %> (params 
object[] args)
    +        public GraphTraversal< <%= method.t1 %> , <%= method.t2 %> > <%= 
toCSharpMethodName.call(method.methodName) %><%= method.tParam %> (<%= 
method.parameters %>)
             {
    -            Bytecode.AddStep("<%= method.methodName %>", args);
    +        <%  if (method.parameters.contains("params ")) {
    +      %>    var args = new List<object> {<%= 
method.paramNames.init().join(", ") %>};
    --- End diff --
    
    We should set the initial capacity of the list to avoid unnecessary 
resizing of the underlying array.
    It should be the sum of the length of `method.paramNames.init()` and 
`method.paramNames.last()`.


---

Reply via email to