optimize search by materializing protobuf on the fly