I am building an iOS app that makes a post to a php file I have on a web server. The php file then 1. uses the rand function to generate a random number
2. checks to see if this exists in the DB
3. either adds it or makes a new one (its a little more complicated than that, but for the sake of the question...)
4. echos the result
I have build an html/js file that generates 1000 XMLHttpRequests to that page with the proper info and for all of the requests to come back it takes like 45 seconds. Is there no way to make this kind of thing happen more instantaneous or is it going to have to be slow due to the 1000 simultaneous requests?