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?

4

1 回答 1

0

这对我来说看起来很棘手,可能需要一个叉子。链表累积方法非常牢固地嵌入。

取而代之的是使用 mapbox 的 pbf 库,它在如何编码到缓冲区方面更加智能。

于 2018-08-10T17:56:33.713 回答