Remove unused polls code to reduce query volume.

Due to use of Submission.{choices, options, bet_options} in realbody,
generating submission_listings resulted in extremely high volume of
SELECT queries.

In local testing with 6 posts, one of which had a poll with 2 options,
the removal of these calls reduced quantity of queries on the homepage
from 84 to 22.

Given that it was previously decided to remove the polls feature after
a regression while adding comment filtering, the remaining dead code
paths for polls were also removed.
This commit is contained in:
TLSM 2022-09-05 03:53:25 -04:00 committed by Ben Rog-Wilhelm
parent cf9819ca5b
commit dbaf0a1bfd
10 changed files with 8 additions and 359 deletions

View file

@ -12,11 +12,6 @@ function collapse_comment(id, element) {
if (flags) flags.classList.add('d-none')
};
function poll_vote_no_v() {
document.getElementById('toast-post-error-text').innerText = "Only logged-in users can vote!";
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
}
function expandMarkdown(t,id) {
let ta = document.getElementById('markdown-'+id);
ta.classList.toggle('d-none');