You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.
Currently CDR uses libsodium directly in the event loop. This is completely fine for things like hashing, generating random strings and encrypting messages but when larger binary data is being encrypted, you will notice it.
The obvious next step is to add workers support. Few open questions with this.
Should it use workers for everything? Is there a point where it's slower to create a worker than use the main loop?
How should CDR deal with concurrency? Should it do some basic rudimentary thread scheduling to avoid creating 4+n workers at the same time on 4 core CPU?
Deliverables
automated worker support
ability to disable worker usage
ability to set worker concurrency
The text was updated successfully, but these errors were encountered:
Initial tests show that workers do increase total computing time a lot with smaller tasks like computing password hashes. On average it takes ~500ms to compute a secure password hash. If you do it in the worker, total time bounces up to ~900ms. I haven't done any deeper benchmarking but I'm willing to bet that ~400ms goes to setting up the worker and initializing sodium.
I need to think a bit how to go forward. Worker support might make sense only with the data encryption and decryption at first. Even with that CDR needs to check whether the incoming data is large enough that it makes sense to create a worker for it.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently CDR uses libsodium directly in the event loop. This is completely fine for things like hashing, generating random strings and encrypting messages but when larger binary data is being encrypted, you will notice it.
The obvious next step is to add workers support. Few open questions with this.
Deliverables
The text was updated successfully, but these errors were encountered: