mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 19:55:00 +00:00
minimize temporary strings for better performance (#1215)
(cherry picked from commit b4fa80c0939ca198bff8e858a4dc241efd31d558)
This commit is contained in:
parent
b4db88a663
commit
232482ca92
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SourceGit.Commands
|
namespace SourceGit.Commands
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ namespace SourceGit.Commands
|
||||||
if (dateEndIdx == -1)
|
if (dateEndIdx == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var dateStr = line.Substring(0, dateEndIdx);
|
var dateStr = line.AsSpan().Slice(0, dateEndIdx);
|
||||||
if (double.TryParse(dateStr, out var date))
|
if (double.TryParse(dateStr, out var date))
|
||||||
statistics.AddCommit(line.Substring(dateEndIdx + 1), date);
|
statistics.AddCommit(line.Substring(dateEndIdx + 1), date);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue