Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Nov 3, 2018

Used by AuthorizationMiddleware. Want to avoid allocations when there is no policy to evaluate.

Hide whitespace for best reviewing experience.

On #1894

HaoK
HaoK previously approved these changes Nov 3, 2018
@davidfowl
Copy link
Member

Where's the before and after number

@JamesNK
Copy link
Member Author

JamesNK commented Nov 3, 2018

Note: I added caching to policy provider tasks.

Before:

 Method | Mean | Error | StdDev | Op/s | Gen 0 | Allocated | ------------- |---------:|---------:|---------:|------------:|-------:|----------:| CombineAsync | 100.7 ns | 2.348 ns | 4.174 ns | 9,927,843.4 | 0.0203 | 184 B | 

After:

 Method | Mean | Error | StdDev | Op/s | Allocated | ------------- |---------:|----------:|----------:|-------------:|----------:| CombineAsync | 57.57 ns | 0.5720 ns | 0.5351 ns | 17,371,422.1 | 0 B | 
@JamesNK JamesNK dismissed HaoK’s stale review November 3, 2018 20:12

More changes

@JamesNK JamesNK merged commit 87c1f1f into jamesnk/authz-middleware Nov 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

4 participants