IronCoreLabs / ironoxide

Rust SDK for IronCore Privacy Platform
https://docs.rs/ironoxide
GNU Affero General Public License v3.0
10 stars 3 forks source link

Port `spawn_blocking` idea to all SDK methods that do significant non-network work #242

Open skeet70 opened 3 years ago

skeet70 commented 3 years ago

In #241 we discovered that our cryptography and other heavy work done in futures leads to blocking easier/faster network calls under load. To fix decrypt_document we moved heavy work into tokio::spawn_blocking to offload it to a threadpool separate from the one that deals with "normal" futures. We should be doing the same (or similar) everywhere that we do blocking work.

skeet70 commented 1 year ago

Where do we think we're doing significant blocking work?