binder: should use android.os.SharedMemory to transport large messages
Open
android
binder
enhancement
- Dominant language
- Java
- Stars
- 12.1k
- Forks
- 4k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Description
### 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.
Contributor guide
Assessment
This issue has not been assessed yet.