I'm currently creating a calculator for a client that has a set of options which all feed into an algorithm which throws out a few figures. The algorithm is coded in PHP and jQuery feeds in the selected options through it's ajax method.
It's better to show than tell so here it is:
http://clients.benpalmer.me/the-eco-experts/solar-calulator/
The calculator currently works out the new figures once an option is selected (but not during). Basically, I'm wanting if possible to use real time calculations so when you slide a percentage slider for example - the figures update as you're sliding (not after).
This is set up with a mysql database which has 8760 rows of data and each row is needed to figure the final figures. As you can probably imagine - this isn't particularly fast.
I'm trying to work out a faster method of figuring this out (I'm not sure if there actually is a faster method).
So far I've thought about putting all of this data in to an array instead on the off-chance that it would be faster. After testing this out - it seems to work at the same sort of speed (probably a bit slower). I've also tried to use the SplFixedArray class in PHP but again, with so much data - there is no discernible improvement in performance.
Unfortunately, I haven't been able to find any other method and I suspect that I'm fighting a losing battle with this one but any suggestions would be greatly appreciated.