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

[CELEBORN-1909] Support pre-run static code blocks of TransportMessages to improve performance of protobuf serialization #3149

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SteNicholas
Copy link
Member

What changes were proposed in this pull request?

Support pre-run static code blocks of TransportMessages to improve performance of protobuf serialization.

Why are the changes needed?

The protobuf message protocol defines many map type fields, which makes it time-consuming to build these message instances. This is because TransportMessages contains static code blocks to initialize a large number of Descriptors and FieldAccessorTables, where the instantiation of FieldAccessorTable includes reflection. The test result proves that the static code blocks execute in about 70 milliseconds.

Therefore, it's better to pre-run static code blocks of TransportMessages to improve performance of protobuf serialization. Meanwhile, it's recommended to use repeated instead of map type field for rpc messages.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI.

…es to improve performance of protobuf serialization
@SteNicholas
Copy link
Member Author

Ping @RexXiong, @FMX.

@SteNicholas SteNicholas requested a review from RexXiong March 12, 2025 07:59
@FMX
Copy link
Contributor

FMX commented Mar 12, 2025

@SteNicholas Thanks, this PR looks very interesting. Is there any performance data to share with us?

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