Re: [capnproto] How to deserialize a message from file (beginner) (c++)

2019-08-13 Thread Benjamin Valpey
Hi Kenton, Yes, that is exactly what I meant by filestream. However, as per your suggestion, perhaps this is not the most efficient way to do this. FYI I am using a few distributions of Linux (Debian, Fedora, and Ubuntu). My files are a bit large (around 5M). However, I do need to process the

[capnproto] Performance of iterating through List vs. raw Data

2019-08-13 Thread philipp . wissmann
Hi We used Cap'n Proto to serialize data in a shared memory environment and defined some message types as structs containining List, i.e. struct Message{ points @0 List(Vector3f) }; Where Vector3f is another struct containing either 3 floats or a List(Float32). However, extracting the Vecto

Re: [capnproto] Performance of iterating through List vs. raw Data

2019-08-13 Thread 'Kenton Varda' via Cap'n Proto
Hi Philipp, This is a bit of an unusual case, where I imagine you are working with bulk vector data forming a 3D mesh or some such, and in order to hand if off to the graphics card, you really need a direct pointer to the underlying data and you need it to be in a specific layout. Using Data is t

Re: [capnproto] How to deserialize a message from file (beginner) (c++)

2019-08-13 Thread 'Kenton Varda' via Cap'n Proto
Hi Benjamin, By "filestream" do you mean the C++ std::fstream class? Cap'n Proto doesn't directly support C++ iostreams, because, frankly, iostreams are slow and poorly-designed. If you want to read from an std::fstream, you'll need to write a custom subclass of kj::InputStream (from kj/io.h) whi