-
Notifications
You must be signed in to change notification settings - Fork 298
Minimal browser builds #8
Comments
@kumavis I have tried to build my own browser version by using browserify. It's working damn slow. |
@tad88dev same experience; |
@tad88dev @hitchcott I'm afraid that is an intentional parameter of using scrypt. The point of scrypt is to be CPU and memory hard. Using the C scrypt implementation it is >10 times faster though. In the browser it should be run in a worker. Alternatively you can try tweaking the scrypt parameters (https://github.com/ethereumjs/ethereumjs-wallet#remarks-about-tov3) with the risk of reducing security significantly. Some wallets (such as keythereum) use much lower iteration count and thus they are faster. etheruemjs-wallet uses the default settings used by geth. |
@axic Agree, scrypt.js is slow down whole process. I have some "cheats" to speed up without change the scrypt parameters. |
Thanks @axic, the webworker solution should be good enough. Perhaps it's worth adding to the docs. Perhaps even webworker could be used automatically if that feature is detected. |
has this problem ever resolved? can this library actually run in the browser with reasonable performance? According to browserify:
Looks like the code is still using the node.js crypto, therefore wondering if this ever resolved? |
by supplying our own more minimal version of https://github.com/crypto-browserify/crypto-browserify
we can drop the following deps:
bc we are only using
we just need to make a more minimal crypto entrypoint https://github.com/crypto-browserify/crypto-browserify/blob/master/index.js
and sub it out with the browser field https://github.com/substack/node-browserify#browser-field
The text was updated successfully, but these errors were encountered: