well-typed / grapesy

Native Haskell gRPC client and server based on `http2`
Other
31 stars 4 forks source link

Parse Protobuf messages as lazy bytestrings #119

Open edsko opened 2 months ago

edsko commented 2 months ago

We currently turn lazy bytestrings into strict bytestrings before parsing them; it would be nicer if we could avoid this step (these chunks are coming from the network layer, it should not be necessary to allocate a single contiguous chunk of memory to parse them). This is blocked on https://github.com/google/proto-lens/issues/62 .

(Fixing this in proto-lens is non-trivial, because the first thing their parser does is turn the strict bytestring into a C pointer to the raw bytes and then proceed from there.)