Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing goes out of memory
Message
From
09/11/2013 10:24:42
 
 
To
08/11/2013 19:03:24
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01587600
Message ID:
01587623
Views:
37
>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
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform