Answer the question
In order to leave comments, you need to log in
How to reduce memory consumption in Yii2?
I am writing a website on this framework and I am confused by the memory consumption of 8 meters per page with 15 requests to the database (it will not work to make one). At a time when a self-written framework that does everything I need, hawala a little more than 1.5 meters. My bike does not have active records like in Yii2. What do I need to disable in Yii2 so that I can upload the site to the host and not think that it will be cut down nah? logs and debugger are disabled.
Answer the question
In order to leave comments, you need to log in
Optimize queries in the database, enable the query cache in the config.
Optimization and only optimization.
My site can have over 1000 requests on a single page with 18mb memory consumption and 150ms load speed;
My settings are something like this:
'components' => [
'db' => [
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'cache',
],
'cache' => [
'class' => 'yii\caching\MemCache'
],
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question