简体   繁体   中英

Why Symfony3 redirect slow

Recently I have tried to write a code in Symfony on page redirect (merely simple code for redirect without any other function), run it on localhost. However, the response returned is quite slow somehow (~500ms). What would be the possible cause of this as Laravel page redirect is faster than this.

When you open the Symfony profiler (just click on the debug toolbar that gets displayed in the bottom of the pages if you are in a development environment) there is a "Last 10" requests button you can click to view profiler information for last couple of requests.

Find your request that returned the redirect response, click on the Token value and you will be able to see in the "Performance" page what is causing the slowdown.

Also, when in development mode some of the changes that you make will require the container to be rebuilt and this can take a while in the development environment with xdebug enabled.

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