-
Notifications
You must be signed in to change notification settings - Fork 16
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
Optimization to avoid excessing reflection #242
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #242 +/- ##
=========================================
Coverage 80.39% 80.39%
- Complexity 1149 1150 +1
=========================================
Files 101 101
Lines 4437 4438 +1
Branches 414 414
=========================================
+ Hits 3567 3568 +1
Misses 675 675
Partials 195 195
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
// This may be too expensive when being done at a large scale(like in the case of | ||
// AttributeValue). | ||
// By using an existing empty builder to create a new builder we are bypassing the reflection | ||
AttributeValue.Builder valueBuilder = AttributeValue.newBuilder(ATTRIBUTE_VALUE_BUILDER); |
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.
That's interesting to know!
Description
Optimization for bypassing the newBuilder() in Avro classes uses SpecificData.getForSchema which uses reflection(Class.forName) for loading the class