Skip to content

Improve swss-common rust performance by not copying string values in FFI #11

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

Merged
merged 3 commits into from
Nov 1, 2024

Conversation

erer1243
Copy link
Collaborator

partner PR to sonic-net/sonic-swss-common#935

Do we want to reorganize the files further? lmk

Copy link
Collaborator

@r12f r12f left a comment

Choose a reason for hiding this comment

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

overall look good to me! a few minor comments.

@r12f r12f changed the title Nocopy on db values Improve swss-common rust performance by not copying string values in FFI Nov 1, 2024
@r12f r12f merged commit b07173f into sonic-net:master Nov 1, 2024
1 check passed
@erer1243 erer1243 deleted the swss-common-nocopy branch November 4, 2024 19:32
lguohan pushed a commit to sonic-net/sonic-swss-common that referenced this pull request Nov 14, 2024
…ffi boundary (#935)

This introduces a couple of new FFI types, representing owned C++ strings and arrays. We use those owned strings for database values, so they do not need to be memcpy'd across ffi boundaries. This is in response to Riff's concerns that database values which hamgrd will be reading may be large and expensive to memcpy.

Partner pr to sonic-net/sonic-dash-ha#11

Co-authored-by: erer1243 <[email protected]>
VladimirKuk pushed a commit to Marvell-switching/sonic-swss-common that referenced this pull request Nov 20, 2024
…ffi boundary (sonic-net#935)

This introduces a couple of new FFI types, representing owned C++ strings and arrays. We use those owned strings for database values, so they do not need to be memcpy'd across ffi boundaries. This is in response to Riff's concerns that database values which hamgrd will be reading may be large and expensive to memcpy.

Partner pr to sonic-net/sonic-dash-ha#11

Co-authored-by: erer1243 <[email protected]>
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.

2 participants