I have a classic asp page that when running do a lengthy check repeatedly calling 20 times the same vbscript function each time with different argument. The function returns either true or false (depending on the argument). Each time the function runs it takes 5-6 seconds. So the whole time is 5*20=100 seconds. It is not an acceptable time the user to wait. I improved things a bit by using Response.Flush()
after each calling to the function so the temporary results published immediately to the browser. BUT I believe that to run the function 20 times asynchronously collecting all the responses to an array is the best solution. I have found that there is a way to use asynchronous calling in server side asp like we use ajax in client side but all the examples use only one asynch calling using MSXML2.ServerXMLHTTP
or Microsoft.XMLHTTP
.
https://gist.github.com/micahw156/2968033
How do I fire an asynchronous call in asp classic and ignore the response?