Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change was made to enable ALL updates to the ErrorHandler to propagate to every captured
GetErrorHandler()
. This also was an attempt to make the error handler (and eventually the global logger) simpler. It had the side effect of also making these calls more performant.Note: When first benchmarking these changes the resetting of the timers made both old and new benchmarks take longer, and occasionally crash. All the benchmark numbers that follow are with the
StopTimer()
andStartTimer()
removed. I can post some before and after stats, but the net effect is additional allocation, because that's what the stop and start guarded, and faster run times, lower ns/op. I don't think the timing is accurate if you pause often within the test.Note2: I removed one benchmark, because in the new method EVERYTHING is a delegate, so there is no difference between the 1 SetErrorHandler and multiple.
What I'm seeing performance-wise from this change is:
SetErrorHandler
is called.