-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
csharp: improve performance and reduce memory footprint when creating…
… and verifying webhook signatures (#1616) Using latest csharp and dotnet features to increase performance and reduce memory footprint when creating and verifying webhook signatures ## Motivation When using the webhook verification process we see lots of memory wasted and garbage collector kicking when our applications gets hit with a lot of webhook requests. ## Solution * using ReadOnly<char> instead of string in Webhook.Verify and Webhook.Sign * using stack alloctions instead of heap allocations when creating and verifing signatures as much as possible * using new Base64 API to convert to base64 operating on spans ## Benchmarks Refer to the PR
- Loading branch information
Showing
3 changed files
with
127 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters