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

growslice issue #708

Open
linchuan4028 opened this issue Sep 27, 2020 · 2 comments
Open

growslice issue #708

linchuan4028 opened this issue Sep 27, 2020 · 2 comments

Comments

@linchuan4028
Copy link

linchuan4028 commented Sep 27, 2020

When using proto repeated type field, I encounter the growslice performance issue as call unmarshal function.
Do we have a initilize method to pre allocate slice size for a repeated fields.

here is the schema

message User_Data_Record {
    message KVR {
    }
    message NPSegment {
        repeated KVR kv = 1; /// this filed encoutner the growslice performance issue
    }
    repeated NPSegment segments = 1;
   
}
@linchuan4028
Copy link
Author

any one can help?

@AllenX2018
Copy link

Can you upload example and benchmarks?
Thanks

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

No branches or pull requests

2 participants