From 3b0440e384cb9d98eed1d928901b81a8b50cf05d Mon Sep 17 00:00:00 2001 From: noahfalk Date: Mon, 20 Nov 2017 17:06:28 -0800 Subject: [PATCH 1/2] Adding Known Issue for the 471 stack trace perf issue --- ...ace might run more slowly on .NET 4.7.1.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 releases/net471/KnownIssues/517815-BCL Applications making heavy use of System.Diagnostics.StackTrace might run more slowly on .NET 4.7.1.md diff --git a/releases/net471/KnownIssues/517815-BCL Applications making heavy use of System.Diagnostics.StackTrace might run more slowly on .NET 4.7.1.md b/releases/net471/KnownIssues/517815-BCL Applications making heavy use of System.Diagnostics.StackTrace might run more slowly on .NET 4.7.1.md new file mode 100644 index 000000000..d4bf1ca59 --- /dev/null +++ b/releases/net471/KnownIssues/517815-BCL Applications making heavy use of System.Diagnostics.StackTrace might run more slowly on .NET 4.7.1.md @@ -0,0 +1,19 @@ +# BCL Applications making heavy use of System.Diagnostics.StackTrace or Exception.StackTrace might run more slowly on .NET 4.7.1 + +## Symptoms +Application that had acceptable performance running on .NET 4.7 executes more slowly when running on .NET 4.7.1 + +## Cause +.NET 4.7.1 added support for detecting and parsing the Portable PDB format to show file and line number information in stack traces. As part of this change each function in a +stack trace needed to have its defining module checked to determine if that module used the Portable PDB format. Due to some differences in the internal caching policy the +runtime would spend far more time searching for Portable PDBs than previous .NET versions spent searching for classic Windows PDBs. This caused formatted stack traces to be +produced more slowly than before. + +The issue was originally reported here: https://github.com/Microsoft/dotnet/issues/529 + +## Workarounds +Calling the System.Diagnostics.StackTrace..ctor(bool) with a parameter of false will avoid capturing source information. This avoids the portion of the code where performance +regressed. + +## Resolution +The fix for Windows 10 Fall Creators Update is expected in a future servicing update. From 9945547c3839375d48a89e47ec9b36386488e852 Mon Sep 17 00:00:00 2001 From: Ron Petrusha Date: Tue, 21 Nov 2017 14:26:40 -0800 Subject: [PATCH 2/2] Incorporated review comments --- ...ackTrace might run more slowly on .NET 4.7.1.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/releases/net471/KnownIssues/517815-BCL Applications making heavy use of System.Diagnostics.StackTrace might run more slowly on .NET 4.7.1.md b/releases/net471/KnownIssues/517815-BCL Applications making heavy use of System.Diagnostics.StackTrace might run more slowly on .NET 4.7.1.md index d4bf1ca59..1a452b81f 100644 --- a/releases/net471/KnownIssues/517815-BCL Applications making heavy use of System.Diagnostics.StackTrace might run more slowly on .NET 4.7.1.md +++ b/releases/net471/KnownIssues/517815-BCL Applications making heavy use of System.Diagnostics.StackTrace might run more slowly on .NET 4.7.1.md @@ -1,19 +1,19 @@ -# BCL Applications making heavy use of System.Diagnostics.StackTrace or Exception.StackTrace might run more slowly on .NET 4.7.1 +# Applications making heavy use of System.Diagnostics.StackTrace or Exception.StackTrace might run more slowly on the .NET Framework 4.7.1 ## Symptoms -Application that had acceptable performance running on .NET 4.7 executes more slowly when running on .NET 4.7.1 +An application that had acceptable performance running on the .NET Framework 4.7 or earlier versions executes more slowly when running on the .NET Framework 4.7.1 ## Cause -.NET 4.7.1 added support for detecting and parsing the Portable PDB format to show file and line number information in stack traces. As part of this change each function in a -stack trace needed to have its defining module checked to determine if that module used the Portable PDB format. Due to some differences in the internal caching policy the -runtime would spend far more time searching for Portable PDBs than previous .NET versions spent searching for classic Windows PDBs. This caused formatted stack traces to be +The .NET Framework 4.7.1 added support for detecting and parsing the Portable PDB file format to show file and line number information in stack traces. As part of this change, each function in a +stack trace has its defining module checked to determine if that module uses the Portable PDB format. Due to some differences in the internal caching policy, the +runtime spends far more time searching for Portable PDBs than previous .NET Framework versions spent searching for classic Windows PDBs. This causes formatted stack traces to be produced more slowly than before. The issue was originally reported here: https://github.com/Microsoft/dotnet/issues/529 ## Workarounds -Calling the System.Diagnostics.StackTrace..ctor(bool) with a parameter of false will avoid capturing source information. This avoids the portion of the code where performance +Call the [System.Diagnostics.StackTrace.#ctor(Boolean)](https://docs.microsoft.com/dotnet/api/system.diagnostics.stacktrace.-ctor?view=netframework-4.7.1#System_Diagnostics_StackTrace__ctor_System_Boolean_) constructor with `false` argument to avoid capturing source information. This avoids the portion of the code where performance regressed. ## Resolution -The fix for Windows 10 Fall Creators Update is expected in a future servicing update. +The fix for this issue is expected in a future servicing update.