CityOfZion / neon-js

Javascript libraries that allow the applications to interact with NEO blockchain
https://docs.coz.io/neo3/neon-js/index.html
MIT License
183 stars 165 forks source link

fix(wallet): resolve slow scrypt encryption/decryption with react #892

Closed ixje closed 1 year ago

ixje commented 1 year ago

fix #891

I can't explain the difference between packages, I just know there is a speed difference despite both being pure-js. I've considered hash-wasm as alternative to ethereum-cryptography, but it was actually slower and required more changes.

snowypowers commented 1 year ago

Is there really a speed difference? Just looking at the test runtimes (this PR and an older run ), the runtimes are very similar.

I am not opposed to using ethereum's package since its more modern & supported but calling it a fix without any stats is not ideal. Do you have any runtime numbers? How about pitching this as a "modernization" instead of a true speed fix?

ixje commented 1 year ago

The test cases indeed do not show much if any difference. The difference is there when used in combination with React. If you check the issue you’ll see a discussion including some code playgrounds where we get very high delays. With this package, in the specific problematic scenario, the speed difference goes from ~13 seconds to sub 1 second.On 15 Apr 2023, at 06:00, Yak Jun Xiang @.***> wrote: Is there really a speed difference? Just looking at the test runtimes (this PR and an older run, the runtimes are very similar. I am not opposed to using ethereum's package since its more modern & supported but calling it a fix without any stats is not ideal. Do you have any runtime numbers? How about pitching this as a "modernization" instead of a true speed fix?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>