-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make hashcode and protobuf size cached, change model records to classes #344
Conversation
d9f81b9
to
cc1e232
Compare
4596db2
to
648f4b0
Compare
pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: jasperpotts <[email protected]>
…nd protobuf size. Signed-off-by: jasperpotts <[email protected]>
Signed-off-by: jasperpotts <[email protected]>
7c9ec4c
to
596bd1f
Compare
Signed-off-by: jasperpotts <[email protected]>
Signed-off-by: jasperpotts <[email protected]>
pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java
Outdated
Show resolved
Hide resolved
# Conflicts: # pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java # pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java # pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/protobuf/CodecMeasureRecordMethodGenerator.java # pbj-core/pbj-runtime/src/main/java/com/hedera/pbj/runtime/RpcMethodDefinition.java # pbj-core/pbj-runtime/src/main/java/com/hedera/pbj/runtime/RpcServiceDefinition.java # pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/JsonBench.java # pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/ProtobufObjectBench.java # pbj-integration-tests/src/main/java/com/hedera/pbj/integration/NonSynchronizedByteArrayInputStream.java
Signed-off-by: jasperpotts <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple suggestions to use printf
instead of string concatenation in println
.
Also noticed all of the generated code blocks now use tabs instead of spaces, which actually makes it pretty unreadable, particularly the larger code blocks which mix tabs and spaces a lot.
pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java
Outdated
Show resolved
Hide resolved
pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java
Outdated
Show resolved
Hide resolved
pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java
Outdated
Show resolved
Hide resolved
pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java
Outdated
Show resolved
Hide resolved
pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: jasperpotts <[email protected]>
Signed-off-by: jasperpotts <[email protected]>
Signed-off-by: jasperpotts <[email protected]>
""".replace("$hashCodeManipulation", HASH_CODE_MANIPULATION).indent(DEFAULT_INDENT); | ||
return $hashCode; | ||
} | ||
""".replace("$hashCodeManipulation", HASH_CODE_MANIPULATION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should $hashCode
be replaced with a field name, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind. I see $hashCode
is a real field name (which is confusing, btw)
PR to fix #343