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

Use newer bytebuffer write functions #44

Merged
merged 1 commit into from
Sep 9, 2020
Merged

Use newer bytebuffer write functions #44

merged 1 commit into from
Sep 9, 2020

Conversation

Lukasa
Copy link
Collaborator

@Lukasa Lukasa commented Sep 9, 2020

Motivation:

NIOSSH does a lot of writing of Data objects. This has been hitting a
slow-path in writeBytes that is not really ideal, so in NIO 2.21 we
added some new fast-path write functions. We should use them!

Modifications:

  • Move most Data writes to writeContiguousBytes.
  • Move signature writes to writeContiguousBytes.
  • Replace repeated writes with writeRepeatedByte.

Result:

More efficient data writing code.

Motivation:

NIOSSH does a lot of writing of Data objects. This has been hitting a
slow-path in writeBytes that is not really ideal, so in NIO 2.21 we
added some new fast-path write functions. We should use them!

Modifications:

- Move most Data writes to writeContiguousBytes.
- Move signature writes to writeContiguousBytes.
- Replace repeated writes with writeRepeatedByte.

Result:

More efficient data writing code.
@Lukasa Lukasa added the patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1) label Sep 9, 2020
@Lukasa Lukasa merged commit 3b7bc70 into apple:main Sep 9, 2020
@Lukasa Lukasa deleted the cb-better-throughput branch September 9, 2020 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants