Hi!
I'm not fluent in English, so sorry if i write something wrong.

Well i'm make on my site some big ranked pool - 300 or 400 items with only 3 choices.
And after some time i find what page with this pool loads two or three times slowly then other pages from my site.
After some research i discover what for every entry in pool "Advanced Poll" generate extract same number of choices as number of items in this pool. So i receive html output larger then 3 Mb!!! But it must be only 3 choice for every item, not 300.

I find little typo in ranking.inc what lead to this issue, but, unfortunately, in current time i can't generate patch file with diff or cvs. So i write fix here and i believe that this issue been fixed in next development release.

ranking.inc
on line 68 instead of:
for ($i = 1; $i <= $num_choices; $i++) {
must be:
for ($i = 1; $i <= $max_choices; $i++) {

Comments

bondd’s picture

Priority: Normal » Critical

Please confirm what this bug will be fixed.

If you now with javascript enabled browser, and don't see this large drop-down rank list - it don't mean what this problem doesn't exist. Browser load the same amount of data in ranked pool, no mater enabled or disabled javascript, and it's HUGE

let's try to explain where the problem.

You create ranked pool with 50... m... biscuits (all around like biscuits, isn't it?), and want give a people chose five "best of the best".
With javascript enabled in browser you can take a biscuit and move it to you chosen rank.
Without javascript you see drop-down rank list right after each biscuit. Let's see how many choices in any of this drop-down list. Hm... strange... By logic it must be only FIVE choices in any of this drop-down list, but you see HUGE list with "50th" on the end.
Maybe it's look not so bad. But think about how many additional kilobytes send to any visitor of this page with 50*(6th-50th).

miro_dietiker’s picture

Status: Active » Needs work

We're not using ranking polls. So please provide a fix according to the guidelines on your own:

Can you provide a patch file (and switch to status "needs review")
Then someone should review this solution.
Finally i'm ready to test it and commit it at that moment.

bondd’s picture

Status: Needs work » Needs review

In that moment i can't create patch file, but fix of this bug is ultimately simple

in file ranking.inc on line 68 instead of:
for ($i = 1; $i <= $num_choices; $i++) {
must be:
for ($i = 1; $i <= $max_choices; $i++) {

bondd’s picture

So anyone review it's fix?
Or you think it no one needed?

gobinathm’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

D6 is EOL hence this issue won't be fixed (or) attended. So closing it.