0

We are working with large (10MB+) protocol buffers and it seems like encoding is producing a ton of garbage. Ultimately I want to get the encoded protobuf onto disk, and I'm thinking I could avoid all of these list node allocations if I were to - with a few other changes - replace the _push call with an append to file call.

Any reasons I shouldn't bother?

corsair
  • 347
  • 3
  • 13

1 Answers1

0

It looks tricky to me and would probably require a fork. The linked list accumulation approach is pretty firmly embedded.

Instead use mapbox's pbf library which is much smarter about how it encodes to a buffer.

corsair
  • 347
  • 3
  • 13