R
R
r2eo2021-09-18 13:51:03
Performance evaluation
r2eo, 2021-09-18 13:51:03

Why is there such a difference in laravel performance on hosting and local?

Transferred the project from a local computer to a hosting and was unpleasantly surprised by the performance. And it's not about queries to the database and complex logic, a simple action:

Route::get('/1', function () {
    return 'привет мир!!!';
});

It is interesting that the Yandex robot receives the page every other time.
And on the local server everything is ok.

On hosting, it consumes 14MB of memory and about 0.15 in time.
For comparison, on LAN 3MB of memory, in time 0.01

I have a normal computer. PHP: 7.4.3 Apache/2.4.41 (Ubuntu). On hosting, too, PHP 7.4

It seems that a professional server should work faster, strange of course.
Can anyone come across?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Konstantin B., 2021-09-18
@Kostik_1993

Most likely you configured something wrong on the hosting. In my experience, projects even on the simplest hosting or vps work much faster than locally, despite the fact that my computer is i5 10gen/16GB/
nvme stands lightweight without extra shells

D
Daniil Myasnikov, 2021-09-18
@m9snikfeed

100% either the php settings are not the same, or the Apache settings (the same cache settings).

R
r2eo, 2021-09-20
@r2eo

Understood.... Business was in a hosting, on another everything flies. Thanks for answers...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question