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

Improve ByteBufPrimitiveCodec readBytes #1617

Merged
merged 6 commits into from
Aug 21, 2023
Merged

Commits on Nov 8, 2022

  1. ByteBufPrimitiveCodec: remove needless hasArray check in readRawBytes

    This method is always used on sliced ByteBuf (as the first 4 bytes old the
    overall size) so the payload will never match the underlying buffer's array
    thus defeats the purpose of the optimization and end up costing CPU cycles.
    
    On a typical application this represent ~0.4% of the CPU
    chibenwa committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    e9986c9 View commit details
    Browse the repository at this point in the history
  2. ByteBufPrimitiveCodec: avoid slicing in readBytes

    Directly read the source ByteBuf while checking for
    content length. Reader index are similarily moved.
    
    On a typical application this takes ~0.88% of CPU
    chibenwa committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    489eae1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3d3fe81 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2022

  1. Configuration menu
    Copy the full SHA
    fdd54b5 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2022

  1. Configuration menu
    Copy the full SHA
    4e96a87 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd7cfc5 View commit details
    Browse the repository at this point in the history