Conversation
|
/cc @javiercn Please consider this new code, looking at the previous code might be helpful to understand, but this diff won't be, they are too different. |
| _resourceExecutedContext = new ResourceExecutedContext(_resourceExecutingContext, _filters) | ||
| { | ||
| Canceled = true, | ||
| Result = _resourceExecutingContext.Result, // Can be null |
There was a problem hiding this comment.
Comment incorrect. Have just asserted that Result is non-null.
| } | ||
|
|
||
| case State.ResultAsyncBegin: | ||
| { |
There was a problem hiding this comment.
Debug.Assert(_resultExecutingContext != null)
|
⌚ |
|
Overall looks good. Functionally everything looks alright compared to the old code (functionally equivalent). There are some small things we can improve (more Debug.Assert) and some comments at certain points of the state transitions to clarify what the algorithm does, as its hard to follow from the state transitions |
|
@javiercn updated |
|
|
||
| private async Task InvokeActionFilterAsync() | ||
| private async Task InvokeActionMethodAsync() | ||
| { |
There was a problem hiding this comment.
Does this include the fix for public object Action(){ return Content("Hello world")!} ?
There was a problem hiding this comment.
This is up to date as of when I updated the PR. If this is missing then I'll address it when I rebase.
|
|
This change is a rewrite of the action invoker into a manual state machine. This makes techempower plaintext go from 245krps -> 265krps.