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
huge performance problem when using append() on a repeated field #246
Comments
We can't remove it without causing a breaking change; for anything that's not a hot inner loop it probably doesn't matter too much. |
Encountered a similar problem in a different context. Accessing the underlying Not sure if there is a better solution until issue is solved upstream. |
There may eventually be a much better solution, and in the medium term there will probably be a slightly better solution. Referencing the underlying |
Lowing this down to its original priority (p3). There are lot of changes are planned for proto-plus vs native protobuf stubs in the future, and most likely this issue will be addressed indirectly as part of that work. |
Closing as a response was provided in #246 (comment) which includes a workaround for performance sensitive applications. (Googlers consider checking with the protobuf team to determine how best to integrate directly with the protobuf API, rather than via proto-plus. Ref b/259448364) |
Consider the following code sample:
Since I have used the plain protobuf library before, (1) was my first intuition. This turned out to be more than 50x slower than the same code but accessing the plain protobuf directly!
Perhaps
append
shouldn't be allowed at all inproto-plus
if it can introduce such a huge slowdown?The text was updated successfully, but these errors were encountered: