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 — Lazily allocate ChunkedWriteHandler#queue by slandelle · Pull Request #13711 · netty/netty

Conversation

@slandelle

@slandelle slandelle commented Nov 30, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Motivation:

When building an HTTP client, a ChunkedWriteHandler might be added to the pipeline just in case a ChunkedInput might be written, but that might never happen.
In this case, we don't need the extra queue allocation and ChunkedWriteHandler should just behave as a pass-through.

Modifications:

  • lazily initialize the queue
  • bypass work when the queue is empty

Sorry, something went wrong.

Uh oh!

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

doom369 and He-Pin reacted with thumbs up emoji He-Pin reacted with heart emoji
All reactions
  • 👍 2 reactions
  • ❤️ 1 reaction
@slandelle
slandelle force-pushed the chunkedwritehandler-optims branch 2 times, most recently from fe7aecd to 43316cd Compare November 30, 2023 12:56
@slandelle

slandelle commented Dec 4, 2023

Copy link
Copy Markdown
Contributor Author

CI 🤷‍♂️

All reactions

Sorry, something went wrong.

Uh oh!

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

@normanmaurer

normanmaurer commented Dec 5, 2023

Copy link
Copy Markdown
Member

@slandelle there is a related test-failure:

2-04T15:33:11.2293946Z [INFO] 
2023-12-04T15:33:11.2294384Z [INFO] Results:
2023-12-04T15:33:11.2294790Z [INFO] 
2023-12-04T15:33:11.2295157Z [ERROR] Failures: 
2023-12-04T15:33:11.2296428Z [ERROR]   ChunkedWriteHandlerTest.testWriteFailureUnchunkedData:303->checkFirstFailed:715 expected: <true> but was: <false>
2023-12-04T15:33:11.2299160Z [INFO] 
All reactions

Sorry, something went wrong.

Uh oh!

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

@normanmaurer

normanmaurer commented Dec 19, 2023

Copy link
Copy Markdown
Member

@slandelle ping

All reactions

Sorry, something went wrong.

Uh oh!

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

@slandelle

slandelle commented Jan 10, 2024

Copy link
Copy Markdown
Contributor Author

Sorry for the delay. I'll have a look by tomorrow.

All reactions

Sorry, something went wrong.

Uh oh!

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

slandelle added 5 commits January 10, 2024 17:45
@slandelle
Lazily allocate ChunkedWriteHandler#queue
2bd86c0
Motivation:

When building an HTTP client, a `ChunkedWriteHandler` might be aded to the pipeline just in cause a `ChunkedInput` might be written, but that might never happen.
In this case, we don't need the extra queue allocation and ChunkedWriteHandler should just behave as a pass-through.

Modifications:

* lazily initialize the queue
* bypass work when queue is empty
@slandelle
english
41284dd
@slandelle
simplify boolean logic
f42fa0d
@slandelle
save some casts
1605e2a
@slandelle
nit: logging clean up
7fb4833
@slandelle
slandelle force-pushed the chunkedwritehandler-optims branch from 6d289c4 to 7fb4833 Compare January 10, 2024 16:46
@slandelle

slandelle commented Jan 10, 2024

Copy link
Copy Markdown
Contributor Author

@normanmaurer Test fixed. Happy new year, BTW.

All reactions

Sorry, something went wrong.

Uh oh!

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

@normanmaurer normanmaurer added this to the 4.1.105.Final milestone Jan 12, 2024
@normanmaurer
normanmaurer merged commit ce0366b into 4.1 Jan 12, 2024
@normanmaurer
normanmaurer deleted the chunkedwritehandler-optims branch January 12, 2024 10:30
@normanmaurer

normanmaurer commented Jan 12, 2024

Copy link
Copy Markdown
Member

@slandelle thanks... happy new year :)

slandelle reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

normanmaurer pushed a commit that referenced this pull request Jan 12, 2024
@slandelle @normanmaurer
Lazily allocate ChunkedWriteHandler#queue (#13711)
756892c
Motivation:

When building an HTTP client, a `ChunkedWriteHandler` might be added to
the pipeline just in case a `ChunkedInput` might be written, but that
might never happen.
In this case, we don't need the extra queue allocation and
ChunkedWriteHandler should just behave as a pass-through.

Modifications:

* lazily initialize the queue
* bypass work when the queue is empty

Result:

Less allocations
@slandelle

slandelle commented Jan 12, 2024

Copy link
Copy Markdown
Contributor Author

@normanmaurer do you need me to provide a PR against the main branch too?

All reactions

Sorry, something went wrong.

Uh oh!

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

@normanmaurer

normanmaurer commented Jan 12, 2024

Copy link
Copy Markdown
Member

@slandelle nope... already cherry-pick 756892c

All reactions

Sorry, something went wrong.

Uh oh!

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

@slandelle

slandelle commented Jan 12, 2024

Copy link
Copy Markdown
Contributor Author

Great, thanks!

All reactions

Sorry, something went wrong.

Uh oh!

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

@cfolgere cfolgere mentioned this pull request Aug 19, 2026
Pooled direct memory increases due to change in ChunkedWriteHandler (Netty 4.1.135) #17304
Open
@copley copley mentioned this pull request Sep 6, 2026
SslHandler: bound TLS wrapping by outbound backpressure #17391
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.105.Final

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

2 participants

@slandelle @normanmaurer
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.