Skip to content

Commit 04a77f9

Browse files
committed
Intern command strings
Only one method interns string because it is used during domain work, parameterless version is used during domain upgrade and such commands will only bloat string cache with single-use strings
1 parent 19baf81 commit 04a77f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Orm/Xtensive.Orm/Sql/Compiler/SqlCompilationResult.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public string GetCommandText()
5959
public string GetCommandText(SqlPostCompilerConfiguration configuration)
6060
{
6161
if (resultText!=null)
62-
return resultText;
63-
string result = PostCompiler.Process(resultNodes, configuration, lastResultLength);
62+
return string.Intern(resultText);
63+
string result = string.Intern(PostCompiler.Process(resultNodes, configuration, lastResultLength));
6464
lastResultLength = result.Length;
6565
return result;
6666
}

0 commit comments

Comments
 (0)