Hello
Some time ago the main admin page started to work very slowly and now it sometimes leads to the 504 message. I've checked other parts of the admin page and it is working all right, so the problem is only in the controller=AdminDashboard. I've turned the profiler on and it says that the init is taking 43 seconds to complete.
How can I find the main source of those timeouts?
One more thing: statistics don't show anything.
Edit1:
Never mind the stats, I've found that the line:
$this->context->smarty->assign('displayBackOfficeHeader', Hook::exec('displayBackOfficeHeader', array()));
is the source of the long generating time.
Could somebody tell me what does it do and what can I do, to speed this thing up?
Edit:2
So, the gamification module is doing that. With the return false:
"public function hookDisplayBackOfficeHeader()
{
return false;"
dashboard is working a lot faster.
I'm pretty sure that the line:
$advice_css_content = Tools::file_get_contents(Tools::getShopProtocol().'gamification.prestashop.com/css/advices/advice-'._PS_VERSION_.'_'.(int)$advice['id_ps_advice'].'.css');
is the main source for the slowness.
Do I have to change anything else or this is it?