bilelmoussaoui / oo7

James Bond went on a new mission as a Secret Service provider
https://bilelmoussaoui.github.io/oo7/oo7/
MIT License
63 stars 12 forks source link

portal: Only derive key if needed - take 2 #21

Closed sophie-h closed 1 year ago

sophie-h commented 2 years ago

Replaces #18

bilelmoussaoui commented 1 year ago

I wonder why the switch back to Mutex instead of RwLock?

sophie-h commented 1 year ago

I don't think there was a reason to switch to RwLock, to begin with. Mutex is usually faster than RwLock.

sophie-h commented 1 year ago

But we can also stick with rwlock

sophie-h commented 1 year ago

I will just revert to RwLock and everyone is happy.

A6GibKm commented 1 year ago

My reasoning for using RwLock is that the api is nicer and that we do multiple reads but only a few writes. It might be possible that RwLock has too big of an overhead for the small amount of operations that we make use but I have no clue if thats the case.

A6GibKm commented 1 year ago

I don't have a strong opinion on the matter, but RwLock vs Mutex is outside of the scope of this PR as far as I can tell.

bilelmoussaoui commented 1 year ago

I don't have a strong opinion on the matter, but RwLock vs Mutex is outside of the scope of this PR as far as I can tell.

I agree, it would be faster to review one thing at a time and land it. I would like to do a new beta release to push this crate a bit forward.

sophie-h commented 1 year ago

RwLock vs Mutex is outside of the scope of this PR as far as I can tell.

Well, your change was based on your assumption that it would make the feature in this PR possible. So I reverted it in the implementation that does not need it.

sophie-h commented 1 year ago

Ready to go from my side