I did some profiling with Xdebug on my Phalcon micro application and found some major issues.
OS: Amazon Linux on Elastic Beanstalk
PHP: 7.1 with OpCache also enabled
Phalcon\Mvc\Micro->mount time used in request is 43% of total requests time (see screenshot)
Phalcon\Mvc\Router->handle time used in request is 15,7% of total requests time (see screenshot) etc...
I have 57 micro collections and 257 routes
The routes is returned from file config/routes.php as an array and is looped in app.php and it automatically creates the routes (see image)
With no route the script execution time is 1-2ms With all 257 routes it is 10-30ms
Do you guys have any suggestions how i can improve performance... ?