Use ArgumentOutOfRangeException Throw methods in SendFileResponseExtensions..CheckRange
To allow inlining by the JIT.
Use ArgumentOutOfRangeException Throw methods in SendFileResponseExtensions..CheckRange to allow inlining by the JIT
- [x] You've read the Contributor Guide and Code of Conduct.
- [x] You've included unit or integration tests for your change, where applicable.
- [x] You've included inline docs for your change, where applicable.
- [x] There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.
Summary of the changes (Less than 80 chars)
Description
Methods that throw exceptions are not inlinable by the JIT.
This PR uses the recently introduced throw methods in the ArgumentOutOfRangeException to allow the logic to be fully inlined in non-error situations to increase performance of static file responses.
FYI @captainsafia, I've enable auto-merge, since it seems straightforward. You have two hours to shout if you disagree. :wink:
@captainsafia, @amcasey, looks like the build still has issues.
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
@paulomorgado When that happens, you should be able to unblock yourself by closing and re-opening the PR. (We're happy to help, but you don't have to wait for us.) Obviously, we're working on making it happen less often.
But you don't need to do it after we manually restart the tests with /azp run. 😛
Ack, apparently close and re-open disables auto-merge. TIL. Sorry about that.