Skip to content
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

avoid flush repeatedly when has finished flushing #839

Merged
merged 4 commits into from
Jul 6, 2021

Conversation

jackjoesh
Copy link
Contributor

Modify content: avoid flush repeatedly when has finished flushing.
After my testing ,this modification can save cpu usage in high concurrency service.

Copy link
Collaborator

@theigl theigl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from minor formatting, this PR looks good to me.

@@ -58,8 +58,9 @@ public void flush () throws KryoException {
} catch (IOException ex) {
throw new KryoException(ex);
}
}else{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please apply project formatting to your changes. There should be whitespace around the else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you , i have formtted

@theigl
Copy link
Collaborator

theigl commented Jul 5, 2021

Thanks @jackjoesh! I think this change makes sense and I will apply it.

@jackjoesh
Copy link
Contributor Author

Thanks @jackjoesh! I think this change makes sense and I will apply it.

thank you for checking

@theigl theigl merged commit ca876f6 into EsotericSoftware:master Jul 6, 2021
@theigl
Copy link
Collaborator

theigl commented Jul 6, 2021

Thanks again @jackjoesh!

ankit-harness pushed a commit to ankit-harness/kryo that referenced this pull request May 10, 2023
* avoid repeat flush when position finish

* Formatting

Co-authored-by: jerry.l <jerry.l@binance.com>
Co-authored-by: Thomas Heigl <thomas.heigl@gmail.com>
ankit-harness added a commit to ankit-harness/kryo that referenced this pull request May 10, 2023
theigl added a commit that referenced this pull request May 19, 2023
* avoid flush repeatedly when has finished flushing (#839)

* avoid repeat flush when position finish

* Formatting

Co-authored-by: jerry.l <jerry.l@binance.com>
Co-authored-by: Thomas Heigl <thomas.heigl@gmail.com>

* Revert "avoid flush repeatedly when has finished flushing (#839)"

This reverts commit d693aa5.

* avoid flush repeatedly when has finished flushing

---------

Co-authored-by: jackjoesh <jackjoesh@sina.com>
Co-authored-by: jerry.l <jerry.l@binance.com>
Co-authored-by: Thomas Heigl <thomas.heigl@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

OutputChunked don't need to do twice super.flush()
3 participants