Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write many records into a file #49

Open
chamb opened this issue Jan 14, 2016 · 2 comments
Open

Write many records into a file #49

chamb opened this issue Jan 14, 2016 · 2 comments

Comments

@chamb
Copy link

chamb commented Jan 14, 2016

Can we use the java capnproto implementation to efficiently write millions of records into a large binary file and then read those records back?

Let's assume to simplify that only one struct is defined, and that all the records we write are of that struct. Writes and then reads are sequential (streaming).

What is expected for efficiency is the ability to reuse message builders and readers or at least the byte buffers they use internally.

@whutbd
Copy link

whutbd commented Sep 24, 2019

I hava do this with c++ capn sdk , write millions of records into a large binary file, then using mmap read them

@sum-elier
Copy link

@dwrensha I have a similar use case with a bytes (Data) list field in a struct which is nested couple of levels in other structs. Each entry of the list can be a couple of MB and potentially thousands of records. Is there a way to read as a stream instead of decoding the full message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants