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

Make CDF readers streaming (or otherwise read large CDF files without running out of memory) #538

Open
moldover opened this issue Oct 8, 2020 · 1 comment

Comments

@moldover
Copy link
Contributor

moldover commented Oct 8, 2020

Currently CDF readers use Jackson to map CVR files into memory all at once. This will not fly for any decent-sized election as @freedomcounts has already discovered we cannot tabulate a single 80k record CDF contest.

So we need some streaming solution. This is complicated by the fact that "static" top-level election definition objects must be parsed before cvrs are prased. Note that static objects probably can be read directly into memory if that's any help - they will be of a reasonable size, even for a big election. The cvr objects however will need to be streamed.

@JDziurlaj
Copy link

For JSON, it should be fairly easy to construct a CDF CVR where the static information appears before the CVRs, since JSON keys are always unordered. XML is ordered, and unfortunately not ideally. There is an issue (usnistgov/CastVoteRecords#27) to address this in a subsequent release.

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

2 participants