You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the descriptor API is internally represented by an Arc<FileDescriptorInner> and indexes into that structure. This makes for a very convenient API and is reasonably efficient. However it could potentially be a bottleneck if we are cloning it in a loop on multiple threads, as seen in https://pkolaczk.github.io/server-slower-than-a-laptop/
APIs like MessageDescriptor::fields will clone the Arc once for each field they iterate over. We could do better with some kind of FieldDescriptorRef type which uses a &FileDescriptorInner internally. This might be worth benchmarking internally first since it is used in DynamicMessage::encode.
The text was updated successfully, but these errors were encountered:
Currently the descriptor API is internally represented by an
Arc<FileDescriptorInner>
and indexes into that structure. This makes for a very convenient API and is reasonably efficient. However it could potentially be a bottleneck if we are cloning it in a loop on multiple threads, as seen in https://pkolaczk.github.io/server-slower-than-a-laptop/APIs like
MessageDescriptor::fields
will clone theArc
once for each field they iterate over. We could do better with some kind ofFieldDescriptorRef
type which uses a&FileDescriptorInner
internally. This might be worth benchmarking internally first since it is used inDynamicMessage::encode
.The text was updated successfully, but these errors were encountered: