As part of all the remote write proto changes I've been working on I tried out moving us off of gogoproto, cherry picking Austin's original changes into a new branch off of the current main branch.
As Tom mentioned, the main reason for using gogoproto is that `repeated SomeMessageType = n;` fields within messages are generated as slices of concrete types rather than slices of pointers, which makes it much easier to write code that avoids extra memory allocations. From what I've hacked together, we can get similar (or potentially better) performance using vtproto and their pooling feature, but it's going to be a big refactoring effort. It might, however, be worth it. It looks to me like even with slightly more allocations the proto marshalling is faster and the marshalled message is smaller. I'll push what I have later this week when I'm more confident it's working correctly. On Thursday, July 8, 2021 at 2:42:41 AM UTC-7 Frederic Branczyk wrote: > I think I'd be most useful to rebase, and create a PR from this, then we > can see whether tests pass and we can run prombench (although I don't think > there are any perf tests that involve the proto parts). Then we can discuss > on there and figure out where to take this. > > Thank you so much for the work you have already put into this! > > On Mon, 21 Jun 2021 at 19:53, Austin Cawley-Edwards <austin...@gmail.com> > wrote: > >> I've updated my branch ( >> https://github.com/austince/prometheus/tree/feat/drop-gogo) to use both >> the vitess plugin and the buf tool, which indeed fit very nicely together. >> >> I've only updated the code enough for it to compile, have not >> investigated the semantic differences. This is likely the furthest I'll be >> able to take this for a bit, so feedback and playing around are welcome and >> appreciated if this is where we'd like protobuf in Prometheus to go :) >> >> Best, >> Austin >> >> On Thu, Jun 17, 2021 at 12:56 PM Frederic Branczyk <fbra...@gmail.com> >> wrote: >> >>> I have heard great thing, but haven’t used it. Wrongfully thought that >>> they are mutually exclusive but turns out they are actually complementary: >>> https://twitter.com/fredbrancz/status/1405192828049838080?s=21 >>> >>> We should probably do an investigation of the combination. >>> >>> On Thu 17. Jun 2021 at 18:26, Austin Cawley-Edwards <austin...@gmail.com> >>> wrote: >>> >>>> Just saw this on the CNCF blog as well, seems like a promising library. >>>> >>>> Tangentially, have you heard of https://github.com/bufbuild/buf? It >>>> seems much nicer than compiling with shell scripts and protoc. >>>> >>>> >>>> -- You received this message because you are subscribed to the Google Groups "Prometheus Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/61ae3461-ae5e-44e6-9ac2-258696bab031n%40googlegroups.com.