You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: