Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slow performance on culture
Message
De
20/12/2010 11:00:17
 
 
À
20/12/2010 04:49:28
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:
01493324
Message ID:
01493373
Vues:
59
>Don't think there's a question here :-}
>But I seem to recall suggesting this months ago.....

Basically, I create an object for each language I support at the application level:
        Public oCultureInfoEnglish As CultureInfo = Nothing
        Public oCultureInfoFrench As CultureInfo = Nothing
        Public oCultureInfoSpanish As CultureInfo = Nothing
        Public oCultureInfoPortuguese As CultureInfo = Nothing
And, I initialize them in the oApp.Initialize() method:
            oCultureInfoEnglish = New CultureInfo("en-US")
            oCultureInfoFrench = New CultureInfo("fr-CA")
Then, I simply make a reference to it when needed. This object creation for the culture stuff seems to be CPU extensive and doing it like that doesn't impact the process when I have to call it multiple times.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform