K
K
KIN19912015-05-05 08:46:21
symfony
KIN1991, 2015-05-05 08:46:21

Symfony2 in dev mode takes 1.5-2 seconds to load, is that normal?

Hello everyone, a question on the subject, the server itself (local) is running on a virtual machine (ubuntu server 14.04). Is this speed normal when loading a simple Hello World out of the box? The server runs on nginx + php-fpm. PHP 5.5.9.
Here is the nginx config

server{
        listen 80;
        charset utf-8;
        root /home/nik/web/test/web;
        server_name symfony.loc;

        rewrite ^/app\.php/?(.*)$ /$1 permanent;

        try_files $uri @rewriteapp;

        location @rewriteapp {
                rewrite ^(.*)$ /app_dev.php/$1 last;
        }

        location ~ /\. {
                deny all;
        }

        location ~ ^/(app|app_dev|config)\.php(/|$) {
                fastcgi_split_path_info ^(.+\.php)(/.*)$;
                include fastcgi_params;
                fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_index app.php;
                send_timeout 1500;
                fastcgi_read_timeout 1500;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_param  HTTPS off;
        }

        # Statics
        location /(bundles|media) {
                access_log off;
                expires 30d;

                # Font files
                #if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){
                #       add_header Access-Control-Allow-Origin *;
                #}

                try_files $uri @rewriteapp;
        }

        error_log /var/log/nginx/project_error.log;
        access_log /var/log/nginx/project_access.log;

}

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
keltanas, 2015-05-05
@KIN1991

For a dev, it's normal, even considering that nothing is known about the configuration of the VM. And it is not clear what is meant by loading and where did these figures come from?

Y
Yuri Yarosh, 2015-05-05
@voidnugget

Yes.
If you don't like it, you should consider Phalcon.

M
Mike, 2015-05-05
@Mike77

turn off asset pre- generation
and if it’s urgent, put xdebug into standby mode, everything works fine
on my core 2 duo and 4gb of memory

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question