Torrent repository with parking_lot crate locks#800
Merged
josecelano merged 4 commits intotorrust:developfrom Apr 16, 2024
Merged
Torrent repository with parking_lot crate locks#800josecelano merged 4 commits intotorrust:developfrom
parking_lot crate locks#800josecelano merged 4 commits intotorrust:developfrom
Conversation
It provides implementations of Mutex and RwLock that are smaller, faster and more flexible than those in the Rust standard library. It will be used to check if a new torrent repo implementation using these lock is faster.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #800 +/- ##
===========================================
+ Coverage 78.55% 78.93% +0.37%
===========================================
Files 160 162 +2
Lines 9024 9186 +162
===========================================
+ Hits 7089 7251 +162
Misses 1935 1935 ☔ View full report in Codecov by Sentry. |
It's used for benchmarking in the torrent-repository workspace package.
15df3ee to
0058e72
Compare
Member
Author
|
ACK 0058e72 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to: #774
A new torrent repository implementation with a different lock implementation for the torrent entry.
The crate is: parking_lot
It's supposed to be faster than the standard implementation of
MutexandRwLock.This PR adds two implementations with
MutexandRwLock.Subtasks
parking_lot::RwLockparking_lot::MutexPerformance
With
parking_lot::RwLock:With
parking_lot::RwLock::MutexWith current implementation (SkipMap and Std Mutex):
Conclusion
Performance looks similar (the current version is slightly better), so I would keep the current version with the standard Mutex.