Proto: update the workaround which reduces memory allocations

This commit is contained in:
Anton Bannykh
2019-10-09 18:18:08 +03:00
parent 1abdcf3f57
commit 82e8bcfca9
87 changed files with 89 additions and 173 deletions
@@ -151,7 +151,7 @@ private fun renamePackagesInSingleFile(javaFile: File) {
javaFile.readLines().joinToString(LineSeparator.getSystemLineSeparator().separatorString) { line ->
line.replace("com.google.protobuf", "org.jetbrains.kotlin.protobuf")
// Memory footprint optimizations: do not allocate too big bytes buffers that effectively remain unused
.replace(" unknownFieldsOutput);", " unknownFieldsOutput, 1);")
.replace(" unknownFieldsOutput);", " unknownFieldsOutput, 1);")
}
)
}