简体   繁体   中英

How to make Symfony faster

My symfony projects work veeery slow, between 4 and 8 seconds per page (I'm working in dev environment). I've tried to use PHP APC (with it, it works slower), I've tried to optimize my code, I`ve tried to explore standard symfony library, etc. But nothig helped me.

PS I have a good hardware, i`m sure that problem isn't in it.

Find where your bottle neck is in your application.

Most likely, this won't be a Symfony issue, but something you have done or a way you have done it.

Install XDebug, profile your application, then analyze the results to figure out what is taking all the relative time to compute. You will probably see something taking like 98% of the relative time, and it will probably be something obscure like a timeout request etc.

Use the profiler to find the bottleneck. There is no way we can determine which part of your application is slow.

You will have to run some benchmark yourself by logging the time at key execution points to drill down into the code until you find the place of the slowness.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM