Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing goes out of memory
Message
De
09/11/2013 10:24:42
 
 
À
08/11/2013 19:03:24
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01587600
Message ID:
01587623
Vues:
36
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform