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

chadchandler’s picture

If it were the module, everyone would be having this. Probably server, try updating.

nehalmehta’s picture

Hi,

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.

chadchandler’s picture

You having VotingAPI installed of course, go into its settings and see when you are tallying votes. Just curious.

frjo’s picture

Category: bug » support

This is a server issue. Take a look at your Apache, PHP and MySQL settings. Install a PHP accelerator.

patchak’s picture

frjo; 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

frjo’s picture

Check out the Drupal handbook section "Server tuning considerations"

http://drupal.org/node/2601

stephencarr’s picture

I 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?

stephencarr’s picture

Using 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.

patchak’s picture

I'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.

stephencarr’s picture

Perhaps 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?

stephencarr’s picture

Status: Active » Closed (fixed)

Here 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.

As If’s picture

FYI - 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.

AntiNSA’s picture

Version: 5.x-1.x-dev » 6.x-3.x-dev
Priority: Normal » Critical
Status: Closed (fixed) » Active

I 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.

marvil07’s picture

Version: 6.x-3.x-dev » 5.x-1.x-dev
Priority: Critical » Normal
Status: Active » Closed (fixed)

Please 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.