D
D
Dmitry2014-07-28 13:58:34
Yii
Dmitry, 2014-07-28 13:58:34

Why does Yii2 save data for a long time?

Hello.
Transferred the site to the hosting. Saving takes a very long time, about 15s, although Yii Debugger shows 300ms.
Tell me, where can the remaining 14+ seconds go?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2014-07-28
@Dimitriys

for the last couple of days for the third time the same answer is copying the "iron" method used by me in someone else's and incomprehensible code :)
Put it at the very beginning
and then scatter it over the code

echo 'Метка 1 - '.round( (microtime(true) - TIMESTART), 5).' сек'.PHP_EOL;
.............
echo 'Метка 2 - '.round( (microtime(true) - TIMESTART), 5).' сек'.PHP_EOL;

and when accessing the page, you will get something like:
Label 1 - 0.003 sec (from the start of execution)
Label 2 - 4.531 sec (from the start of execution)
Label 3 - 4.582 sec (from the start of execution),
from which it will become clear that between label 1 and label 2 something was processed for 4.5 seconds.
Narrow your search by shifting labels until you find the problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question