Tallying via the web interface often times out for elections with large numbers of votes (several hundred plus).
As outlined in T269029#6697060, the bottleneck occurs when temporary directories and files are written and shell commands executed for each vote. We can try to improve this by writing some of these dirs/files only once and/or decrypting once in batch.
Decrpytion is done via ElectionTallier::addRecord, which is passed into DBStore::callbackValidVotes as a callback:
public function callbackValidVotes( $electionId, $callback, $voterId = null ) { $dbr = $this->getDB(); $where = [ 'vote_election' => $electionId, 'vote_current' => 1, 'vote_struck' => 0 ]; if ( $voterId !== null ) { $where['vote_voter'] = $voterId; } $res = $dbr->select( 'securepoll_votes', '*', $where, __METHOD__ ); foreach ( $res as $row ) { $status = call_user_func( $callback, $this, $row->vote_record ); if ( $status instanceof Status && !$status->isOK() ) { return $status; } } return Status::newGood(); }
This may involve some refactoring of these methods.