grpc-java icon indicating copy to clipboard operation
grpc-java copied to clipboard

binder: should use android.os.SharedMemory to transport large messages

Open jdcormie opened this issue 2 years ago • 0 comments

Is your feature request related to a problem?

Both CPU and wall clock time of sending a message are dominated by the overhead of calling transact(). Today we need O(n) transactions where n is the size of the message.

Describe the solution you'd like

https://developer.android.com/reference/android/os/SharedMemory could be used to send any sized message in O(1) binder transactions.

Describe alternatives you've considered

Apps can already accomplish this using ParcelableMetadata, but it is cumbersome and prevents your app from working with other gRPC transports.

jdcormie avatar Dec 05 '23 19:12 jdcormie