Is Laravel really this slow?

后端 未结 10 1584
长情又很酷
长情又很酷 2020-12-04 06:20

I just started using Laravel. I\'ve barely written any code yet, but my pages are taking nearly a second to load!

\"

10条回答
  •  暖寄归人
    2020-12-04 07:03

    I use Laravel quite a bit and I simply do not believe the numbers it tells me because end-to-end rendering as measured by my browser shows LOWER total time from request to ready.

    Further, I get slightly higher numbers on my machine at work, which does execute the page noticeably faster than my machine at home.

    I don't know how those numbers are getting calculated, but they are not corroborated by observation, or browser tools like Firebug...

    Laravel is not actually all that slow, especially when optimized. It is memory-hungry however. Even a heavy CMS like Drupal which is very slow, appears to have about 1/3rd the memory footprint of a bare bones Laravel request.

    Thus to run Laravel in production, I would deploy to memory-optimized servers before CPU-optimized servers.

提交回复
热议问题