mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-29 16:14:59 +00:00
perf: minimize temporary strings for better performance (#1292)
This commit is contained in:
parent
5d1601086f
commit
15ee2dac91
3 changed files with 18 additions and 18 deletions
|
@ -1502,7 +1502,7 @@ namespace SourceGit.Views
|
|||
{
|
||||
if (line.Content.Length > 10000)
|
||||
{
|
||||
builder.Append(line.Content.Substring(0, 1000));
|
||||
builder.Append(line.Content.AsSpan().Slice(0, 1000));
|
||||
builder.Append($"...({line.Content.Length - 1000} characters trimmed)");
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue