Performance of RSA decrypt
I am getting 20ms for a 4096bit RSA key decrypting on iOS and 223ms on Android consistently.
Some of the overhead is the React Native bridge, which we can not reduce I think. There are just 2 (relatively small) strings pushed over to the native side.
Could we increase the thread priority for decrypting?
I am unsure what are good timings. 223ms on Android sounds terrible, I can look into how to speed this up but am no expert
Maybe first step is to increase the task prio. It's currently running on normal prio. Should be highest possible before real-time.
Another useful optimisation would be to support blob. Then a request response could be fed to this module without any overhead and directly read from it.
See https://gist.github.com/joshjhargreaves/b0d3f92e05d06d2dd3d6609698621641
We can put blob storage as a feature request but increasing the priority on Android seems like a good first step here