C# 从resx文件读取资源非常慢

C# 从resx文件读取资源非常慢,c#,asp.net,performance,resources,resource-files,C#,Asp.net,Performance,Resources,Resource Files,我有一个资源文件 -stringsCommon0.resx 是1320行 对于阅读资源,我使用以下代码 DateTime time1 = DateTime.Now; string strResult = Resources.stringsCommon0.ResourceManager.GetString(stringName); DateTime time2 = DateTime.Now; double mil = (time2 - time1).Total

我有一个资源文件 -stringsCommon0.resx

是1320行

对于阅读资源,我使用以下代码

DateTime time1 = DateTime.Now;

string strResult = Resources.stringsCommon0.ResourceManager.GetString(stringName);                

DateTime time2 = DateTime.Now;

double mil = (time2 - time1).TotalMilliseconds;
当我看mil时,它给出的结果在15到17之间

我认为这是一个非常大的数字,因为在我的应用程序中,我总是通过代码从stringsCommon0读取它

在调试时获取值时


我现在该怎么办?结果正常吗?对于多种语言,我还应该做些什么?

在同一个程序中测量两次,然后告诉我们第二个结果。我认为只有第一次访问速度慢,其余的应该更快。@fejesjoco no在第一次访问后,我得到107毫秒,而不是每次16毫秒。此外,您应该使用测量经过的时间,而不是
DateTime