You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using PipedInputStream/PipedInputStream (which requires an additional thread)
Using an Okio Buffer
I only measured performance (operators-per-second), not memory usage. I'd like to measure the memory usage, but kotlinx.benchmark doesn't support profiler arguments yet.
tl;dr: Buffer is slowest. Piped streams are on average faster, but the speed is inconsistent. ByteArray is slower than Piped streams, but more consistent.
Currently the Build Cache implementations load the build cache entries into memory as a ByteArray
gcp-gradle-build-cache/gcpbuildcache/src/main/kotlin/androidx/build/gradle/gcpbuildcache/GcpBuildCacheService.kt
Lines 70 to 74 in 6ff6573
gcp-gradle-build-cache/s3buildcache/src/main/kotlin/androidx/build/gradle/s3buildcache/S3BuildCacheService.kt
Lines 72 to 76 in 6ff6573
I believe this will negatively impact performance (although I admit I haven't done any testing, so I could be wrong!).
It can be avoided by piping the streams. For example:
I'd be happy to contribute a PR.
The text was updated successfully, but these errors were encountered: