title: php time consuming script - normal POST or multiple AJAX requests?
body: <p>I'm going to give you an abstract of the system. It has orders and every order needs to be processed by an external API. Normally around 100 200 orders need to be processed at a time so it would be a time consuming task. Currently I use normal post request with the order ids passed in and I've increased PHP resources to some extent.</p>
  
  <p>The main concern: Don't know if for some reason the script uses up all the resources and stops. This is very undesired because it may stop at any time during execution, the other thing is I don't want to allocate too much resources as I know this is also a bad idea.</p>
  
  <p>So I was wondering if I use multiple AJAX requests for every order, wouldn't that be better actually? It would certainly take more time overall because of making the request and instantiating the objects and stuff every time. But I will be quite sure that the allocated resources won't be used up and the script will complete successfully. It also gives me the possibility to inform the user interactively about how many orders have been processed.</p>
  
  <p>Any feedback from experienced users is welcome.</p>