-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce the size of the MessageID structs by one word on 64-bit arch (#…
…316) An int occupies one word of memory; on 64-bit machines, this is 8 bytes. As a result, the messageID struct is 56-bytes: * ledgerID - 8 bytes * entryID - 8 bytes * batchIdx - 8 bytes * partitionIdx - 8 bytes * tracker - 8 bytes * consumer - 16 bytes (1 word for type, 1 word for data address) This commit changes the type of batchIdx and partitionIdx fields to int32 which saves one word of memory and maintains alignment of struct fields. Reducing the size of the MessageID structs is important as they are currently allocated on the heap for every message produced or consumed. Signed-off-by: Daniel Ferstay <dferstay@splunk.com> Co-authored-by: Daniel Ferstay <dferstay@splunk.com>
- Loading branch information
Showing
5 changed files
with
19 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
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