protobuf-go/reflect/protoregistry
Martin Möhrmann 91eb7d3a63 protoregistry: avoid checking for '/' in FindMessageByName
Profiling shows FindMessageByName spending considerable time
in strings.LastIndexByte in FindMessageByURL.

This overhead can be avoided by giving FindMessageByName
its own implementation not pruning the name string up
to the last '/' which can not appear in a protobuf name.

Change-Id: Ifec07689f72790ead8b7552cd04dd99fa67b61e4
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/240378
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2020-07-01 19:55:25 +00:00
..
registry_test.go internal/testprotos: hide all public testprotos 2020-01-12 08:32:55 +00:00
registry.go protoregistry: avoid checking for '/' in FindMessageByName 2020-07-01 19:55:25 +00:00