Voting taked an eternity to be processed, looks like it does not work...

patchak - November 4, 2007 - 20:40
Project:Vote Up/Down Package
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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?

#1

Prodigy - November 7, 2007 - 18:52

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

#2

nehalmehta - November 7, 2007 - 19:32

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.

#3

Prodigy - November 7, 2007 - 20:30

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

#4

frjo - November 8, 2007 - 09:20
Category:bug report» support request

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

#5

patchak - November 8, 2007 - 09:45

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

#6

frjo - November 9, 2007 - 10:15

Check out the Drupal handbook section "Server tuning considerations"

http://drupal.org/node/2601

#7

stephencarr - January 27, 2008 - 05:59

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?

#8

stephencarr - January 28, 2008 - 16:51

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.

#9

patchak - January 28, 2008 - 17:25

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.

#10

stephencarr - January 29, 2008 - 02:38

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?

#11

stephencarr - February 1, 2008 - 04:03
Status:active» closed

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.

 
 

Drupal is a registered trademark of Dries Buytaert.