forked from netty/netty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ByteBufUtil.BYTE_ARRAYS ThreadLocal temporary arrays in more plac…
…es (netty#8464) Motivation: netty#8388 introduced a reusable ThreadLocal<byte[]> for use in decodeString(...). It can be used in more places in the buffer package to avoid temporary allocations of small arrays. Modifications: Encapsulate use of the ThreadLocal in a static package-private ByteBufUtil.threadLocalTempArray(int) method, and make use of it from a handful of new places including ByteBufUtil.readBytes(...). Result: Fewer short-lived small byte array allocations.
- Loading branch information
1 parent
10539f4
commit 5954110
Showing
5 changed files
with
25 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters