Closed (fixed)
Project:
Vote Up/Down
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Nov 2007 at 20:40 UTC
Updated:
28 Feb 2011 at 07:06 UTC
Hey there,
I noticed that more often than not, when I click on an arrow to vote it really takes a long time until the vote is actually processed and showed on the page. It seems like the vote as not been taken into account and the user (thinks) the vote did not work. I sometimes have to wait as long as 30 seconds until the vote is considered... I was wondering what can cause such a delay... is it the server or something like that?? Is it maybe a bug in the module?? How could I check out more in depth what is going on here?
Comments
Comment #1
chadchandler commentedIf it were the module, everyone would be having this. Probably server, try updating.
Comment #2
nehalmehta commentedHi,
It certainly takes some time. Even on localhost it takes sometime, but amount of time for me on our prodcution server is also very less. It is so less that we were able to easily ignore it, but certainly it takes some time.
Comment #3
chadchandler commentedYou having VotingAPI installed of course, go into its settings and see when you are tallying votes. Just curious.
Comment #4
frjo commentedThis is a server issue. Take a look at your Apache, PHP and MySQL settings. Install a PHP accelerator.
Comment #5
patchak commentedfrjo; thanks for the answer,
Do you have any idea on what I should be looking for? Any special details I should be looking for??
Patchak
Comment #6
frjo commentedCheck out the Drupal handbook section "Server tuning considerations"
http://drupal.org/node/2601
Comment #7
stephencarr commentedI am having the same problem and have thought of a simple way around it. Why can't the vote button change instantly when you click if and then process the AJAX request in the background? If the AJAX fails it can simply revert the button state, if it stays the same then do nothing.
Why does the button currently have to wait for the AJAX to reply before changing the state of the button? Is there a reason for this?
Comment #8
stephencarr commentedUsing the devel module I have found the reason that voteupdown is slow... It seems that when you use it in along with the content recommendation module the following function gets called some 2-3k times for each vote (I have a lot of nodes on my site, they all seem to get cross referenced by this function.
23.73 1 cre_modify_avg_difference SELECT DISTINCT r.content_id, r2.value-r.value as rating_difference, r.content_type as content_type1, r2.content_type as content_type2 FROM votingapi_vote r, votingapi_vote r2 WHERE r.uid=1 AND r2.content_id=5078 AND r2.uid=r.uid AND r.content_type = 'node'Most of them don't take 23.73ms to process but when you have over 2k of them it still takes an age.
Comment #9
patchak commentedI'm also using CRE module with vote up down module, so I guess you found something useful there. Is there anything we can do, currently I'm not sure how I could speed this up.
Comment #10
stephencarr commentedPerhaps if you could install the devel module and see if it is also running similar lengthy queries to my setup. Then I suppose we should go over to the CRE module project and raise a ticket there also?
Comment #11
stephencarr commentedHere is an explanation from the CRE maintainer.
http://drupal.org/node/215692
I think this issue is now closed as it really has nothing to do with up/down.
Comment #12
As If commentedFYI - I'm using vote up/down version 6.x-2.0 on a server which has been optimized to the max by a PHP-MySQL zealot, and we are not using CRE. Nevertheless, the time it takes for the average up/down vote to take effect is between 2 and 3 minutes. Obviously no user is going to hang around that long.
Comment #13
AntiNSA commentedI am using pantheon and I can say my server is flying. But still when voting up / down it locks the whole page up and launches the chrom site crashed and I have to wait forever before the vote is registered and the page can scroll again. This is using varnish/memcache/apc, etc. And it was like this on a vanilla 6.2 setup to. i really wish this couldbe addressed. this is critical.
Comment #14
marvil07 commentedPlease do not hijack issues :-/. Open a a new issue with more details about the problem, I suggest to try it isolated on a new drupal site and provide the exact version you are using, unless you are really using a non released code.