AsyncKeyedLock library vs SixLabors.ImageSharp.Web.AsyncKeyLock #295
Unanswered
MarkCiliaVincenti
asked this question in
Show and tell
Replies: 1 comment 3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am the author of a library called AsyncKeyedLock (NuGet package). I ran some benchmarks comparing my library against SixLabors.ImageSharp.Web.AsyncKeyLock.
Source for benchmarks run on GitHub Actions
Depending on the conditions of the test, SharpLabor.ImageSharp.Web.AsyncKeyLock consumes 18% to 84% MORE memory compared to AsyncKeyedLock, and the time it spends ranges between 1% and 64% more time. Tests with different parameters for number of locks and contention, as well as trying out with a different number of GUID reversals to simulate more realistic environments where something is actually happening inside the lock.
The above benchmarks are from GitHub Actions but I tested on a laptop in Safe Mode and got very similar results.
Code for benchmarks can be found at https://github.com/MarkCiliaVincenti/AsyncKeyedLockBenchmarks/
Would you consider adding a dependency to my library if I make a PR, @JimBobSquarePants?
Beta Was this translation helpful? Give feedback.
All reactions