Skip to content

Optimizations for Http2FrameLogger#3492

Closed
nmittler wants to merge 2 commits intonetty:masterfrom
nmittler:frame_logger
Closed

Optimizations for Http2FrameLogger#3492
nmittler wants to merge 2 commits intonetty:masterfrom
nmittler:frame_logger

Conversation

@nmittler
Copy link
Copy Markdown
Member

Motivation:

The logger was always performing a hex dump of the ByteBufs regarless whether or not the log would take place.

Modifications:

Fixed the logger to avoid serializing the ByteBufs and calling the varargs method if logging is not enabled.

Result:

The loggers should run MUCH faster when disabled.

Motivation:

The logger was always performing a hex dump of the ByteBufs regarless whether or not the log would take place.

Modifications:

Fixed the logger to avoid serializing the ByteBufs and calling the varargs method if logging is not enabled.

Result:

The loggers should run MUCH faster when disabled.
@nmittler
Copy link
Copy Markdown
Member Author

@Scottmitch and @louiscryan can you take a look

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

don't have to create a slice, can use

ByteBufUtil.hexDump(buf, buffer.readerIndex(), length)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

@louiscryan
Copy link
Copy Markdown

LGTM

@nmittler
Copy link
Copy Markdown
Member Author

This is simple so I'm just cherrypicking ... in master and 4.1.

@nmittler nmittler closed this Mar 12, 2015
@Scottmitch
Copy link
Copy Markdown
Member

@nmittler - Yes this looks good :)

@Scottmitch Scottmitch added this to the 4.1.0.Beta5 milestone Mar 12, 2015
Gordiychuk added a commit to Gordiychuk/netty that referenced this pull request Jul 26, 2017
Currentry logger create hex dump even if log write will not apply.
It's unecessary GC overhead. Restore optiomization from netty#3492

Close netty#7025
normanmaurer pushed a commit that referenced this pull request Jul 26, 2017
Motivation:

Currentry logger create hex dump even if log write will not apply.
It's unecessary GC overhead.

Modifications:

Restore optimization from #3492

Result:

Fixes #7025
liuzhengyang pushed a commit to liuzhengyang/netty that referenced this pull request Sep 10, 2017
Motivation:

Currentry logger create hex dump even if log write will not apply.
It's unecessary GC overhead.

Modifications:

Restore optimization from netty#3492

Result:

Fixes netty#7025
kiril-me pushed a commit to kiril-me/netty that referenced this pull request Feb 28, 2018
Motivation:

Currentry logger create hex dump even if log write will not apply.
It's unecessary GC overhead.

Modifications:

Restore optimization from netty#3492

Result:

Fixes netty#7025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants