>You are creating millions of string instances in a short period of time. See
http://msdn.microsoft.com/en-us/library/system.string%28v=vs.110%29.aspx#Immutability. Using the StringBuilder in this case doesn't help because the ToString call at the end creates the new string.
>
>For doing multiple calls, you should create a single StringBuilder at the start and execute all of the replaces using the same StringBuilder. After the replaces are finished, then call your ToString.
I am trying to understand here. If I have such a load of calls, either I create the StringBuilder in the caller or in here would still create the same result because it would be created the same amount of calls as well.
Could you elaborate more on this?
Thanks