Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ROS2 experiments shows that a lot of keyexprs shares common chunks, which can be quite big, for example:
0/pub_20/set_parameters/rcl_interfaces::srv::dds_::SetParameters_/RIHS01_56eed9a67e169f9cb6c1f987bc88f868c14a8fc9f743a263bc734c154015d7e0
@ros2_lv/0/5639ab36ef9be8852b663e09962a618d/0/4/SS/%/%/pub_20/%pub_20%set_parameters/rcl_interfaces::srv::dds_::SetParameters_/RIHS01_56eed9a67e169f9cb6c1f987bc88f868c14a8fc9f743a263bc734c154015d7e0/:2:,1000:,:,:,,
In order to reduce the memory consumption, this PR caches the chunks in the resource tree, using a kind of string interning. Also, small chunks like
pub_20
are directly stored inlined in the bytes of the chunk pointer (small string optimization).