Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

high processing latency when running in react-native #9

Open
AmitShah opened this issue May 27, 2018 · 1 comment
Open

high processing latency when running in react-native #9

AmitShah opened this issue May 27, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@AmitShah
Copy link
Collaborator

AmitShah commented May 27, 2018

Background: There is a high latency when engine.onMessage is called from a device.The RN debugger masks the issue as calls are delegated to the chrome js engine which can perform these crypto function calls rapidly. With debugger disabled, we can track the issue.

Problem: With profiling, it was determined that the getter method "from()" for message.SIgnedMessage class is not caching the calculated ethAddress value from the signature and thus calling _recoverAddress multiple times in the lifecycle.

Solution: Implementing caching of this property changes the processing latency from 1.3s to <400 ms. So consider updating the class to reflect the caching strategy.

Enhancements: To further improve on this we should adopt my ported native ECDSA methods from bitcoin-core and write our own custom wrapper.

@AmitShah AmitShah added the enhancement New feature or request label May 27, 2018
@AmitShah AmitShah self-assigned this May 27, 2018
@AmitShah
Copy link
Collaborator Author

AmitShah commented May 27, 2018

create a react-native js wrapper for this: https://github.com/AmitShah/ios-secp256k1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant