I changed culture to Persian in my PC, after that my app load database slower about five times because of this line:
Convert.ToDateTime(someString)
what is problem? and what I should do to fix it?
UPD1: example of string 2010-08-03 00:00:00.000
UPD2: I measure with this following code:
string s = "2010-08-03 00:00:00.000";
DateTime start = DateTime.Now;
int n = (int)5e6;
for (int i = 0; i < n; i++)
{
DateTime date = Convert.ToDateTime(s);
}
DateTime finish = DateTime.Now;
Console.WriteLine(finish - start);
Console.ReadKey();
in default(AD) calendar:(~5 seconds)
00:05:48
and when I change calendar to Persian in windows 10:(~4 minutes)
03:51:73