#4876 - Make point weighting calculations more efficient

  • By
  • Added
  • 6 views
Identifier #4876
Issue type Minor issue (breaks specific functionality)
Title Make point weighting calculations more efficient
Status Completed
Tags

AutonomousOrganisation (custom)

Pseudo-addon: Forum topic polls (custom)

Roadmap: v11 (custom)

Handling member PDStig
Addon core_cns
Description The current method of calculating point weights in #4775 is very inefficient. It is possible on large sites for polls to have up to a million votes. It is not reasonable to tally all 1,000,000 vote records in the database to process voting power / weighted results.

A possible suggestion is to utilize the same method used to cache the number of votes for each answer (and the poll itself) via cns_topics_recache by cacheing total voting power and updating it accordingly when necessary (simple addition or subtraction on new votes or revoked votes, etc).
Steps to reproduce

Related to

#4775 - Point-normalised poll results

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated