Closed (fixed)
Project:
Voting API
Version:
5.x-1.5
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Dec 2007 at 11:16 UTC
Updated:
20 Jun 2008 at 00:51 UTC
Hi,
I run www.fsdaily.com , a very busy website.
I am also developing a karma module based on the VotingAPI.
Whenever somebody votes for a comment or a node, a vote for that particular user is automatically added.
I am a little concerned about performance. A user will end up getting between 4000 and 8000 votes after a little while. Right now, votingapi_recalculate_results() calls _votingapi_get_raw_votes which can become a bit of a performance issue.
I can get around it by NOT adding a vote for the user, but forcing something into the cache by calling _votingapi_insert_cache_result() - the karma would be calculated by an SQL query.
Do you think that would be a little too horrific?
Bye,
Merc.
Comments
Comment #1
mercmobily commentedHi,
I just wanted to let you know that I solved this issue.
Basically, the user_karma module create a custom vote with the karma value. For each entry, there will also be an entry in the cache table.
So, it works - have a look at the user_karma module if you have a minute!
Merc.
Comment #2
eaton commentedThanks. This problem is also handled differently in VotingAPI 2.0, and is somewhat more efficient.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.