Here's image from xdebug logs
Router is like this:
use \Phalcon\Mvc\Router;
$router = new Router();
$router->addGet('/v1/', array(
'controller' => 'index',
'action' => 'index'
));
$router->addGet('/v1/user/login',
array(
'controller' => 'User',
'action' => 'login'
));
$router->addGet('/v1/user/logout',
array(
'controller' => 'User',
'action' => 'logout'
));
... ~40+ more similar lines
Autoloader:
<?php
$loader = new \Phalcon\Loader();
$loader->registerDirs(array(
$config->application->controllersDir,
$config->application->pluginsDir,
));
$loader->registerPrefixes(
array(
"Model" => $config->application->modelsDir,
"Model_Base" => $config->application->modelsBaseDir,
"Swift_" => $config->mail->swiftDir,
)
);
$loader->registerNamespaces(array(
"App" => $config->application->libraryDir,
"PayPal" => $config->application->paypalLibDir,
));
$loader->register();
Phalcon version: 1.3.4 PHP version: 5.6.10-1+deb.sury.org~precise+1
I use very simillar syntax in other projects and there is no lag. Loads up < 30ms. I use mongo db, maybe there is something with it I should know?