uProxy-p2p
uProxy-p2p copied to clipboard
Cordova makes TCP sockets slow
The Cordova framework implements all JS<->Java message passing on Android by serializing method calls into a CordovaArgs object. When this object contains an ArrayBuffer, it is serialized to Base64: https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaArgs.java#L107 . This conversion is on the performance critical path for uProxy, because all TCP data flows through this serialization.
We should figure out how to avoid this kind of conversion, for performance. This seems likely to require changes to cordova-android.