-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add PooledBinary Class #308
Conversation
45b5dd4
to
9ec386b
Compare
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.
PTAL
java/common/src/main/java/org/apache/tsfile/utils/PooledBinary.java
Outdated
Show resolved
Hide resolved
if (length != binary.getLength()) { | ||
return false; | ||
} | ||
for (int i = 0; i < length; i++) { |
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.
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.
Make sense
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.
not compatible with jdk8 , please ignore this comment
java/common/src/main/java/org/apache/tsfile/utils/PooledBinary.java
Outdated
Show resolved
Hide resolved
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.
LGTM
Summary
Add PooledBinary class for Binary object allocation optimization.
This PR introduces a new PooledBinary class designed for binary object pooling at the application layer. It aims to improve allocation performance and reduce GC overhead by enabling binary object reuse.
Details
The PooledBinary class is similar to the existing Binary class but with additional features to support object pooling:
Next Steps
This is the first step in a series of planned changes. Future PRs will modify specific Binary usages to PooledBinary in the codebase.