Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Slow performance on culture
Message
From
20/12/2010 11:00:17
 
 
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:
01493324
Message ID:
01493373
Views:
58
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform