-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(performance): Change *sync.RWMutex to sync.RWMutex #2351
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2351 +/- ##
==========================================
+ Coverage 98.39% 98.48% +0.08%
==========================================
Files 41 41
Lines 2304 2303 -1
==========================================
+ Hits 2267 2268 +1
+ Misses 21 20 -1
+ Partials 16 15 -1
Continue to review full report at Codecov.
|
@thinkerou Please review again. I will bump to v1.6.3 after merge this PR. |
See the report from Travis: https://travis-ci.org/github/gin-gonic/go-http-routing-benchmark/jobs/682559844
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@appleboy also update readme.me? thanks! |
@thinkerou What content in the readme I need to update? |
@appleboy here https://github.com/gin-gonic/gin#benchmarks |
@thinkerou Yes. I know. I will take it after release v1.6.3 version. Thanks for your remind. |
See gin-gonic/gin#2351 Signed-off-by: Maxime Soulé <btik-git@scoubidou.com>
See gin-gonic/gin#2351 Signed-off-by: Maxime Soulé <btik-git@scoubidou.com>
Would you like to tell me Why *sync.RWMutex to sync.RWMutex can improvement performance ,I've read the code change, but I still don't know what the change solves to improve performance |
@appleboy i also want to know why improvement performance~ |
needn't share a lock for multiple contexts. |
fix #2350
See the report: #2350
Change
*sync.RWMutex
tosync.RWMutex
. See the commetstep and result
Testing in my Macbook Pro
Benchmark Result:
Or you can see the benchmark result from Travis: https://travis-ci.org/github/gin-gonic/go-http-routing-benchmark/jobs/682559844