In order to avoid timeout errors, TallyPage shouldn't attempt to tally encrypted elections if they have more than a certain number of votes.
Instead, it should display an error message advising the user to tally using the tally.php maintenance script.
What's the threshold for a large election?
@jrbs attempted to tally some large encrypted elections in T269029#6693314 and T269029#6693321 and found:
No. votes | Timed out? |
594 | Yes |
2118 | Yes |
This was before we improved the speed of tallying in T271824. Locally we found significant speed-ups. It's difficult to test on production given the limited availability of large elections. @jrbs is the above table still the case, since T271824?
Until we know for sure, we could start by setting the threshold at 100 votes, based on some testing that @dom_walden did on beta.
Acceptance criteria
- If an election is unencrypted, TallyPage works the same as before
- If an election is encrypted, but has 100 votes or fewer, TallyPage works the same as before
- If an election is encrypted and has more than 100 votes, TallyPage displays an error (similar to the error shown if the election isn't finished yet)
- The error message says: The election is too large to be tallied via this page. Please use the maintenance script tally.php instead.