Open
Description
Currently the Build Cache implementations load the build cache entries into memory as a ByteArray
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:
override fun store(key: BuildCacheKey, writer: BuildCacheEntryWriter) {
// ...
val incoming = PipedOutputStream()
writer.writeTo(incoming)
val contents = PipedInputStream(incoming)
storageService.store(cacheKey, contents, writer.size) // must manually pass the size down
}
I'd be happy to contribute a PR.
Metadata
Metadata
Assignees
Labels
No labels