I have a simulator that pulls data from a DB - calculates and return JSON result to an ajax call that renders a table for the results.
The calculation procedure are as follow:
- grab X number of data that are group together and have weights to them.
- use historical data and run a weight distribution algorithm on the group.
- return as a JSON the metrics of each data, the old value, and the calculated new value
Thus far it takes approx 55 seconds for the result to return 2000 entries on 14 days worth of data.