Reputation: 16364
I am currently refactoring some code to transform some actions in commands in my Symfony 2.7 application.
At first, I was making a GET request to some endpoint, the corresponding controller was making a call to a service and responded with a 200 http response.
Now, I want to execute this service from a command interface so I use the Console Component of Symfony.
The problem is: The command way is very, very slow. Is there a reason for that?
Upvotes: 2
Views: 1515
Reputation: 1587
Commands, by default, are run in dev environment, meaning more logging, capturing data for the profiler...
Try appending --env=prod
.
Upvotes: 8