Page loads fast but page transitions slow
I'm using PHP with CodeIgniter 2.02 and MySQL for my site. When I click a navigation link to load another page on my site it takes a long time to load. I've run the CodeIgniter profiler and that shows that the pages in question only take 2 seconds to load including controller execution and queries. It's kind of like the web browser is just th开发者_JS百科inking for about 4 seconds and then decides to load my page. Does anyone have any suggestions as to how I could debug and pinpoint the issue?
There are many factors which could be causing the slow speed:
- API's which are slow to respond to your requests
- Low browser memory
- Poor .htaccess or /config/routes routing
- High server load
- Poor use of cache or lack-thereof
- Poor use of conditional statements, loops, timeouts,
sleep()
's etc. - Too many included files
- Etc...
I'd run a unit test on the application and take advantage of Google Page Speed for optimization. It will point out bottlenecks and offer advice to speed up your site.
精彩评论