Open tarheel opened 5 years ago
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.
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.