-
Notifications
You must be signed in to change notification settings - Fork 52
Enable WebWorkers to make it go faster #9
Comments
Sorry, but this is already enabled, the default is |
Guess it would make sense to set it to |
|
Why not use |
Sorry, |
Yes we could use the internal estimator |
Oh, I'm so sorry everyone libp2p-crypto currently uses the blocking sync version. So this is an issue. It means I need to change the interface, but will do that asap and switch to the faster async version... |
It's not as easy as I would like, as we are depending on this being synchronous in the constructors of js-peer-id and js-peer-info. That means changing this requires as us to refactor the use of all those constructors to methods like |
@dignifiedquire can we get a bench test to run in a couple of laptops to see if node-forge is efficient using WebWorkers? I want to know if we save enough time that justifies all of those changes |
@diasdavid we need to make the change in any case to use webcrypto later down the line, i.e. all crypto operations should be done async everywhere. But will need to generate some tests what speed diffs we get |
Fixed in #12 |
node-forge supports WebWorkers
enable here: https://github.com/libp2p/js-libp2p-crypto/blob/master/src/keys/rsa.js#L131
The text was updated successfully, but these errors were encountered: