I have a problem with a slow Laravel application. When I post XML content that is about 1 MB (15 000 lines) I get a response after about 33 seconds. The web.php is simple, I only handle requests to the specific XML handler URL:
Route::post('/XmlPost', 'XmlController@handlePost');
Inside the Controller I handle the data like so:
class XmlController extends Controller
{
public function handlePost(Request $request)
{
$xml = \simplexml_load_string($request->getContent());
}
}
Event if I try to do a dd before the simplexml_load_string call I takes about 33 seconds before something happends.
Is there any way I can make the Laravel application handle data faster? Or at least pretend to handle data faster by sending a reply to the client when the data has been transferred? I have no idea why it uses that amount of time. If I send a simple character or just a line of XML there is no problem. I have disabled the session handling in the Kernel.php file.
Thanks for any tips or guidance!
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2x5ES26
via IFTTT
Aucun commentaire:
Enregistrer un commentaire