mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 10:22:13 +08:00
minimize temporary strings for better performance (#1215)
(cherry picked from commit b4fa80c0939ca198bff8e858a4dc241efd31d558)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
|
||||
namespace SourceGit.Commands
|
||||
{
|
||||
@@ -40,7 +40,7 @@ namespace SourceGit.Commands
|
||||
if (dateEndIdx == -1)
|
||||
return;
|
||||
|
||||
var dateStr = line.Substring(0, dateEndIdx);
|
||||
var dateStr = line.AsSpan().Slice(0, dateEndIdx);
|
||||
if (double.TryParse(dateStr, out var date))
|
||||
statistics.AddCommit(line.Substring(dateEndIdx + 1), date);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user