PDA

View Full Version : Search Page Speed on Min Max Boxs



greengiant
08-17-2003, 11:12 AM
Hi,

I thought i had fixed the speed isues with min max boxes, but i totaly broke them in the 1.1.2 release.. I am working on 1.1.3 right now to correct that and some other issues. I need everyones input....

Right now, building the min max boxes for a price search is very slow. This is becuase we format each option with this.

money_formats(international_num_format($i))

This causes the page load time to jump from 3 seconds to 12, on the demo site.. If we do away with that though we are left with themin and max options looking like
0
10000
20000

instead of looking like this..
$0.00
$10,000.00
$12,000.00

Basically i want everyones input on how we should handle this, do we not format teh price, or do we deal with a slow load time, or does someone have a suggestion on how to speed this up....

greengiant
08-17-2003, 11:18 AM
well i speed it up some i am getting about 5 seconds or so on the demo site now to load teh search page... I created a new varialbe $z and ran the formating seperate creating the $options varialbe.... I think i will go with this.

for ($i = $min; $i <= $max; $i += $step)
{
$z = international_num_format($i);
$z = money_formats($z);
$options .= '<option value=$i>'.$z.'</option>';
if ($i - $step > $max)
{
$i = $max;
$options .= '<option value=$i>'.$z.'</option>';
}
}