Okay – based on the ideas that I described earlier, I now have a working demo.
The problem as described, is that AJAX is not very good at coping with massive numbers of small function calls – the http requests gum up the networks.
The solution was to try to aggregate all the small calls into single http requests, run all the function requests on the server, and return the results as a single array.
Here are my results:
| old non-aggregated version | New KaeJAX Whiter-Than-White brand |
|---|---|
| demo | demo |
output:loading… please wait |
output:loading… please wait |
| tamperdata screenshot
hah! i don’t think so – it was well too large to even bother replicating . |
tamperdata screenshot |
| source code | source code |
Judge for yourself.
Entries (RSS)
December 5th, 2006 at 3:59 pm
[...] A while back, I demonstrated the problem with concurrency, and a possible solution. In the massively concurrent version of the script it took my laptop 30.02s to complete the tests. In the optimised version, it took 2.53s – an improvement of more than 10x. [...]