GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Speed up base64 encoding of certs and keys by chrisvest · Pull Request #14405 · netty/netty

Conversation

@chrisvest

@chrisvest chrisvest commented Oct 18, 2024

Copy link
Copy Markdown
Member

Motivation:
Our SSL tests spend a lot time encoding certs and keys to their PEM representation, which involves base64 encoding. Our tests also run with leak detection enabled, which may trace on every buffer write. That's very slow.

Modification:
When possible, do our base64 encoding through a flattened unpooled buffer. Unpooled buffers don't have leak detection attached to them. We also ensure that our writes only go through a single buffer layer.

Result:
Our netty-handler tests, many of which involve SSL, now run much faster.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

franz1981 reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@chrisvest
Speed up base64 encoding of certs and keys
c5e61ed
Motivation:
Our SSL tests spend a lot time encoding certs and keys to their PEM representation, which involves base64 encoding.
Our tests also run with leak detection enabled, which may trace on every buffer write.
That's very slow.

Modification:
When possible, do our base64 encoding through a flattened unpooled buffer.
Unpooled buffers don't have leak detection attached to them.
We also ensure that our writes only go through a single buffer layer.

Result:
Our netty-handler tests, many of which involve SSL, now run much faster.
@chrisvest
chrisvest requested review from franz1981 and normanmaurer October 18, 2024 23:43
@chrisvest chrisvest modified the milestones: 4.2.0.Beta1, 4.1.115.Final Oct 18, 2024
@chrisvest

chrisvest commented Oct 18, 2024

Copy link
Copy Markdown
Member Author

I suspect this will be big enough to show on the average CI build times.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrisvest chrisvest mentioned this pull request Oct 18, 2024
Fix SSL session resumption with ClientAuth.OPTIONAL and add tests with session tickets #14404
Merged
@chrisvest

chrisvest commented Oct 19, 2024

Copy link
Copy Markdown
Member Author

Compared to other recent 4.1 PRs this cuts 10-20 minutes off the build time.
This PR: https://github.com/netty/netty/actions/runs/11412536221/usage?pr=14405
Compared to #14391: https://github.com/netty/netty/actions/runs/11192014567/usage

franz1981 reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

franz1981
franz1981 approved these changes Oct 19, 2024
View reviewed changes

@franz1981 franz1981 left a comment

Copy link
Copy Markdown
Contributor

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.

Great finding!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
normanmaurer
normanmaurer requested changes Oct 19, 2024
View reviewed changes
Comment thread codec/src/main/java/io/netty/handler/codec/base64/Base64.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@chrisvest
Address review comments
8a6c291
@chrisvest

chrisvest commented Oct 21, 2024

Copy link
Copy Markdown
Member Author

@normanmaurer @franz1981 Updated.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrisvest
chrisvest merged commit d0d4a51 into netty:4.1 Oct 22, 2024
@chrisvest
chrisvest deleted the 4.1-ssl-base64 branch October 22, 2024 20:06
chrisvest added a commit that referenced this pull request Oct 22, 2024
@chrisvest
Speed up base64 encoding of certs and keys (#14405)
66aa08d
Motivation:
Our SSL tests spend a lot time encoding certs and keys to their PEM
representation, which involves base64 encoding. Our tests also run with
leak detection enabled, which may trace on every buffer write. That's
very slow.

Modification:
When possible, do our base64 encoding through a flattened unpooled
buffer. Unpooled buffers don't have leak detection attached to them. We
also ensure that our writes only go through a single buffer layer.

Result:
Our netty-handler tests, many of which involve SSL, now run much faster.
This was referenced Sep 14, 2026
Http2: Reserve promised stream for PUSH_PROMISE after local RST_STREAM #17471
Closed
cache failure 1233e4a5 #17565
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@franz1981 franz1981 franz1981 approved these changes
@normanmaurer normanmaurer normanmaurer requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.1.115.Final

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@chrisvest @normanmaurer @franz1981
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.