perf: minimize temporary strings for better performance (#1255)

This commit is contained in:
qiufengshe 2025-04-29 09:33:14 +08:00 committed by GitHub
parent 53a55467f1
commit 48bb8e91de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 35 additions and 23 deletions

View file

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Threading.Tasks;
@ -31,7 +32,7 @@ namespace SourceGit.ViewModels
{
_repo = repo;
_revision = commit.SHA;
_saveFile = $"archive-{commit.SHA.Substring(0, 10)}.zip";
_saveFile = $"archive-{commit.SHA.AsSpan().Slice(0, 10)}.zip";
BasedOn = commit;
}