grpc / grpc/grpc-java

Determine whether we should drop dependency on ByteStreams

Open
#6,266 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

We purposefully avoided com.google.io for Android, which is why IoUtils existed. I'm not sure if anything there has changed, but #5834 started using com.google.io. ByteStreams pulls in a bit more code that would initially be expected and maintaining IoUtils was trivial. There is some potential performance gains (memory usage and CPU) to be had by ByteStreams, because it uses shards that are combined at the end vs one contiguous chunk of ByteArrayInputStream.

From #5834 we see that using ByteStreams added .5K and 14 methods. That's not much, but simultaneously seems a bit much for limited gain.

This came up as ByteStreams.toByteArray was noticed by a Google-internal Android checker for some related code. (cl/272629838)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.