Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge HandleTracking interception aspect into RecordInvocation #723

Merged
merged 1 commit into from
Nov 11, 2018

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Nov 11, 2018

The first of these two interception aspects basically has the same purpose as the latter: recording that an invocation happened. For this reason, it would make sense to do combine the former into the latter, and thus to speed up the interception pipeline.

There's one possible BUT against moving the logic of HandleTracking into RecordInvocation: In RecordInvocation, we no longer have the chance to record invocations of "well-known methods" (such as those defined by System.Object) because the interception pipeline might already have stopped at that point.

Fortunately, this doesn't matter as we are typically not interested in those well-known methods when making use of AmbientObserver: they don't have signatures that allow chaining or assignment, nor are they matchers.

The first of these two interception aspects basically has the same
purpose as the latter: recording that an invocation happened. For this
reason, it would make sense to do combine the former into the latter,
and thus to speed up the interception pipeline.

There's one possible BUT against moving the logic of `HandleTracking`
into `RecordInvocation`: In `RecordInvocation`, we no longer have the
chance to record invocations of "well-known methods" (such as those
defined by `System.Object`) because the interception pipeline might
already have stopped at that point.

Fortunately, this doesn't matter as we are typically not interested in
those well-known methods when making use of `AmbientObserver`: they
don't have signatures that allow chaining or assignment, nor are they
matchers.
@stakx stakx merged commit c5ffae8 into devlooped:master Nov 11, 2018
@stakx stakx deleted the interception branch November 11, 2018 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant