rcv
rcv copied to clipboard
optimize CVR CDF JSON generation
The main thing is that it's not at all scalable to construct the entire map in memory and then write out the JSON. We should use a streaming JSON writer instead, e.g. https://static.javadoc.io/com.google.code.gson/gson/2.6.2/com/google/gson/stream/JsonWriter.html
We might also consider combining the somewhat redundant data structures in CastVoteRecord: winnerToFractionalValue and cdfSnapshotData.
Bright Spots call on this. If it is strictly a CDF issue, it can probably wait.