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.
Reduce memory allocations in StompSubframeDecoder.readHeaders
Motivation: When decoding stomp frames a lot of unnecessary character arrays are created when parsing headers. For every header, an array is created to read the line into and then more when splitting the line at the colon. Modifications: Parse key and value of a header while reading the line instead of afterwards. Reuse a single AppendableCharSequence. Reduce initial size of AppendableCharSequence when reading the command as it is expected to be short. Result: Allocations when parsing stomp frames have dropped significantly.
- Loading branch information
1 parent
4c1e0f5
commit 27ff153
Showing
1 changed file
with
55 additions
and
19 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