From 55308bef8b5633eaf6cf6460a4f2f894b0fa5d11 Mon Sep 17 00:00:00 2001 From: Qstick Date: Mon, 9 Jan 2023 22:20:25 -0600 Subject: [PATCH] Prefer AsSpan to Substring to avoid unnecessary allocation (cherry picked from commit 4db10e6283fa5c5c167604a6cdade7299d567f4d) Close #2263 --- .../Datastore/Migration/Framework/SqliteSyntaxReader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSyntaxReader.cs b/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSyntaxReader.cs index c41425ab7..8ca85ba88 100644 --- a/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSyntaxReader.cs +++ b/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSyntaxReader.cs @@ -250,7 +250,7 @@ protected string ReadEscapedString(char escape) } Index = end + 1; - identifier.Append(Buffer.Substring(start, end - start)); + identifier.Append(Buffer.AsSpan(start, end - start)); if (Buffer[Index] != escape) {