.NET 4.0调试,冷启动性能
这个问题在过去的一周里一直让我发疯 我们已经将3.5解决方案迁移到4.0(开始使用EF4),这里没有什么大问题。我已经使用VisualStudio2010 Final一段时间了,没有任何问题 将解决方案和关联的第三方程序集迁移到.net 4.0,尽管运行时性能与3.5相当,但在几台好的计算机(Core i7、Core i5笔记本电脑和具有大量ram的Phenom 4x台式机)上启动调试器现在需要2:30到3:00左右的时间 在3.5解决方案上,整个过程大约需要20-30秒!!,幸运的是,如果我们在没有调试的情况下启动站点,并且只在事后附加调试器,那么就没有问题了,而且一切看起来都正常 我得到的输出窗口首次异常超过了4000个,这似乎减慢了进程: mscorlib.dll中发生了类型为“System.Globalization.CultureNotFoundException”的第一次意外异常 我已经调试了这个异常,没有结论,似乎在CultureInfo方法name=Resx上,显然这不是一个正确的区域性:.NET 4.0调试,冷启动性能,.net,performance,debugging,exception,.net-4.0,.net,Performance,Debugging,Exception,.net 4.0,这个问题在过去的一周里一直让我发疯 我们已经将3.5解决方案迁移到4.0(开始使用EF4),这里没有什么大问题。我已经使用VisualStudio2010 Final一段时间了,没有任何问题 将解决方案和关联的第三方程序集迁移到.net 4.0,尽管运行时性能与3.5相当,但在几台好的计算机(Core i7、Core i5笔记本电脑和具有大量ram的Phenom 4x台式机)上启动调试器现在需要2:30到3:00左右的时间 在3.5解决方案上,整个过程大约需要20-30秒!!,幸运的是,如果我们
public CultureInfo(String name, bool useUserOverride) {
if (name==null) {
throw new ArgumentNullException("name",
Environment.GetResourceString("ArgumentNull_String"));
}
Contract.EndContractBlock();
// Get our data providing record
this.m_cultureData = CultureData.GetCultureData(name, useUserOverride);
if (this.m_cultureData == null)
throw new CultureNotFoundException(
"name", name, Environment.GetResourceString("Argument_CultureNotSupported"));
this.m_name = this.m_cultureData.CultureName;
this.m_isInherited = (this.GetType() != typeof(System.Globalization.CultureInfo));
}
以下是堆栈跟踪:
> mscorlib.dll!System.Globalization.CultureInfo.CultureInfo(string name, bool useUserOverride) Line 264 + 0xef bytes C#
System.Web.dll!System.Web.HttpServerUtility.CreateReadOnlyCultureInfo(string name) + 0xb8 bytes
System.Web.dll!System.Web.UI.Util.IsCultureName(string s) + 0x84 bytes
System.Web.dll!System.Web.UI.Util.GetCultureName(string virtualPath) + 0x4a bytes
System.Web.dll!System.Web.Util.HashCodeCombiner.AddResourcesDirectory(string directoryName) + 0x18c bytes
System.Web.dll!System.Web.Util.HashCodeCombiner.AddResourcesDirectory(string directoryName) + 0x16c bytes
System.Web.dll!System.Web.Util.HashCodeCombiner.AddResourcesDirectory(string directoryName) + 0x16c bytes
System.Web.dll!System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate2(System.Web.Compilation.StandardDiskBuildResultCache diskCache) + 0x13a bytes
System.Web.dll!System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate(System.Web.Compilation.StandardDiskBuildResultCache diskCache) + 0x38 bytes
System.Web.dll!System.Web.Compilation.BuildManager.RegularAppRuntimeModeInitialize() + 0xaf bytes
System.Web.dll!System.Web.Compilation.BuildManager.Initialize() + 0x106 bytes
System.Web.dll!System.Web.Compilation.BuildManager.InitializeBuildManager() + 0xb8 bytes
System.Web.dll!System.Web.HttpRuntime.HostingInit(System.Web.Hosting.HostingEnvironmentFlags hostingFlags, System.Security.Policy.PolicyLevel policyLevel, System.Exception appDomainCreationException) + 0x15f bytes
System.Web.dll!System.Web.HttpRuntime.InitializeHostingFeatures(System.Web.Hosting.HostingEnvironmentFlags hostingFlags, System.Security.Policy.PolicyLevel policyLevel, System.Exception appDomainCreationException) + 0x3c bytes
System.Web.dll!System.Web.Hosting.HostingEnvironment.Initialize(System.Web.Hosting.ApplicationManager appManager, System.Web.Hosting.IApplicationHost appHost, System.Web.Configuration.IConfigMapPathFactory configMapPathFactory, System.Web.Hosting.HostingEnvironmentParameters hostingParameters, System.Security.Policy.PolicyLevel policyLevel, System.Exception appDomainCreationException) + 0x224 bytes
System.Web.dll!System.Web.Hosting.HostingEnvironment.Initialize(System.Web.Hosting.ApplicationManager appManager, System.Web.Hosting.IApplicationHost appHost, System.Web.Configuration.IConfigMapPathFactory configMapPathFactory, System.Web.Hosting.HostingEnvironmentParameters hostingParameters, System.Security.Policy.PolicyLevel policyLevel) + 0x1d bytes
[Appdomain Transition]
System.Web.dll!System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(string appId, System.Web.Hosting.IApplicationHost appHost, System.Web.Hosting.HostingEnvironmentParameters hostingParameters) + 0xfd1 bytes
System.Web.dll!System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(string appId, System.Web.Hosting.IApplicationHost appHost, System.Web.Hosting.HostingEnvironmentParameters hostingParameters) + 0x2f bytes
System.Web.dll!System.Web.Hosting.ApplicationManager.GetAppDomainWithHostingEnvironment(string appId, System.Web.Hosting.IApplicationHost appHost, System.Web.Hosting.HostingEnvironmentParameters hostingParameters) + 0x67 bytes
System.Web.dll!System.Web.Hosting.ApplicationManager.CreateObjectInternal(string appId, System.Type type, System.Web.Hosting.IApplicationHost appHost, bool failIfExists, System.Web.Hosting.HostingEnvironmentParameters hostingParameters) + 0x4d bytes
System.Web.dll!System.Web.Hosting.ApplicationManager.CreateObject(string appId, System.Type type, string virtualPath, string physicalPath, bool failIfExists, bool throwOnError) + 0x8d bytes
System.Web.dll!System.Web.Hosting.ApplicationManager.CreateObject(string appId, System.Type type, string virtualPath, string physicalPath, bool failIfExists) + 0x35 bytes
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Server.GetHost() + 0x14b bytes
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(object acceptedSocket) + 0xa7 bytes
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) Line 1507 + 0xb bytes C#
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) Line 441 + 0xe bytes C#
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() Line 1486 + 0x22 bytes C#
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Line 974 C#
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() Line 1341 + 0x5 bytes C#
- 有人有过同样的问题吗李>
- 有没有办法找到根本原因 此异常(堆栈跟踪不可用) 结论性)或/和性能 退化