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

Refactor shmem::Message to reduce its size in memory #485

Merged
merged 4 commits into from
Oct 19, 2023

Conversation

rbx
Copy link
Member

@rbx rbx commented Oct 18, 2023

  • Move the members of MetaHeader flat into shmem::Message and sort them by size.
  • Remove alignment member. Accept explicit argument for the method where it is needed (SetUsedSize), optionally. By default try to deduce reasonable alignment.

This reduces the size of shmem::Message from 92 bytes to 80 bytes. Two more members not clearly visible when skimming through the class are the this pointer, since we use virtual methods, and the member of the parent class - fTransport.

@rbx rbx marked this pull request as draft October 18, 2023 19:44
@rbx rbx marked this pull request as ready for review October 18, 2023 19:44
@rbx
Copy link
Member Author

rbx commented Oct 18, 2023

Want to do couple more tests before review, but let the CI run already.

@rbx rbx requested a review from dennisklein October 19, 2023 09:40
Copy link
Member

@dennisklein dennisklein left a comment

Choose a reason for hiding this comment

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

Please put the explanation text from the PR why you flatten the MetaHeader member also into the first commit msg. Thx! Otherwise looks all fine to me.

Move the members of MetaHeader flat into shmem::Message and sort them by
size to reduce the size of the class.
@rbx rbx merged commit f05a09d into FairRootGroup:dev Oct 19, 2023
11 of 13 checks passed
@rbx rbx deleted the refactor-shm-msg branch February 16, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants