perf: DebugStackTrace no longer creates a stack trace for dynamic methods#4954
perf: DebugStackTrace no longer creates a stack trace for dynamic methods#4954jamescrosswell wants to merge 5 commits intomainfrom
Conversation
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4954 +/- ##
=======================================
Coverage 73.88% 73.88%
=======================================
Files 496 496
Lines 17951 17954 +3
Branches 3516 3517 +1
=======================================
+ Hits 13263 13266 +3
- Misses 3826 3827 +1
+ Partials 862 861 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Removed duplicate entry for DebugStackTrace feature.
|
|
||
| var assembly = options.FileSystem.OpenFileForReading(assemblyName); | ||
| return new PEReader(assembly); | ||
| if (options.FileSystem.FileExists(assemblyName)) |
There was a problem hiding this comment.
question: I guess it's not too easy - or better to say "economic" - to add a unit test for this, right?
There was a problem hiding this comment.
It could possibly be done. This isn't really a functional change though (it doesn't change the behaviour of our SDK)... it's more of a performance change. We're avoiding using exceptions for control flow here and the need to create stack traces for those exceptions.
Given that it's not a functional change, I think a unit test would be overkill... And we could create a benchmark but, again, kind of pointless since we know it's going to be quicker than the previous/alternative code.
resolves: #4939
#skip-changelog