-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix performance problems when compiling generated code with Kotlin 1.4
When a protobuf message definition contains a lot of fields/oneofs, the generated Kotlin code cannot be compiled by a Kotlin 1.4 compiler. The compiler runs out of memory when compiling the long list of `FieldDescriptor`s that gets passed to the `MessageDescriptor`. This change implements a workaround that avoids the Kotlin compiler bug by initializing the list of `FieldDescriptor`s outside of the `MessageDescriptor` constructor. Also add a test proto file to catch regressions with large protobuf messages. Fixes #94
- Loading branch information
Showing
3 changed files
with
3,092 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.