wzzly Posted April 14, 2021 Share Posted April 14, 2021 Hi all, we are trying to improve BO speed, because loading every page in the backoffice takes more than 3 seconds. When I enable profiler, I see that it is caused by config and initheader: Time Cumulated Time Memory Usage Memory Peak Usage config 1631 ms 1631 ms 26.62 Mb 33.98 Mb __construct 0 ms 1631 ms - Mb 33.98 Mb init 87 ms 1718 ms 1.75 Mb 33.98 Mb checkAccess 0 ms 1718 ms - Mb 33.98 Mb setMedia 20 ms 1738 ms 0.21 Mb 33.98 Mb postProcess 0 ms 1738 ms - Mb 33.98 Mb initHeader 1847 ms 3585 ms 1.75 Mb 33.98 Mb initContent 0 ms 3586 ms - Mb 33.98 Mb initFooter 1 ms 3586 ms 0.01 Mb 33.98 Mb display 43 ms 3629 ms 0.27 Mb 33.98 Mb Config is faster when no visiting the orders page, but initHeader is slow on every BO page. I already tried deleting all third party modules on a staging site, but the problem remains. Also unhook all modules from hooks like DisplayBackOfficeHeader or DisplayBackOfficeTop does not help... Any idea why this is only on the BO? The frontoffice is fine and initheader is even it 0ms on FO. Link to comment Share on other sites More sharing options...
wzzly Posted April 14, 2021 Author Share Posted April 14, 2021 BTW I noticed that when I enable debug mode, I get the following error on any BO page. Could that haev anything to do with it? Link to comment Share on other sites More sharing options...
musicmaster Posted April 14, 2021 Share Posted April 14, 2021 If you have enabled the profiler, why don't you mention the slowest queries? That could be more enlightening. My impression is that the "array to string conversion" is caused by some module. Link to comment Share on other sites More sharing options...
wzzly Posted April 14, 2021 Author Share Posted April 14, 2021 @musicmaster thanks for your reply. Here is a screenshot of the slowest queries: Link to comment Share on other sites More sharing options...
musicmaster Posted April 15, 2021 Share Posted April 15, 2021 12 hours ago, wzzly said: @musicmaster thanks for your reply. Here is a screenshot of the slowest queries: I miss the frequency: how often these queries are called. But the numbers of milliseconds are very low. So maybe it is not queries that take up the time. Link to comment Share on other sites More sharing options...
wzzly Posted April 15, 2021 Author Share Posted April 15, 2021 @musicmaster Where can I find the frequenties then? Link to comment Share on other sites More sharing options...
wzzly Posted April 15, 2021 Author Share Posted April 15, 2021 I do see in de ObjectModel instances section that /classes/Link.php [897] is called 138 times? Is that OK? Is Link to comment Share on other sites More sharing options...
wzzly Posted April 15, 2021 Author Share Posted April 15, 2021 @musicmasterwhen opening the orders page, I do get slow queries? Link to comment Share on other sites More sharing options...
wzzly Posted April 15, 2021 Author Share Posted April 15, 2021 This is the line (897) from the /classes/Link.php //Use the matching shop if present, or fallback on the default one if (null !== $idShop) { $shop = new Shop($idShop); } else { $shop = new Shop(Configuration::get('PS_SHOP_DEFAULT')); } is it not able to find the shop ID or something? Link to comment Share on other sites More sharing options...
wzzly Posted April 15, 2021 Author Share Posted April 15, 2021 Is it normal these values are empty? Link to comment Share on other sites More sharing options...
musicmaster Posted April 15, 2021 Share Posted April 15, 2021 2 hours ago, wzzly said: Is it normal these values are empty? Yes, that is normal. Link to comment Share on other sites More sharing options...
musicmaster Posted April 15, 2021 Share Posted April 15, 2021 5 hours ago, wzzly said: This is the line (897) from the /classes/Link.php //Use the matching shop if present, or fallback on the default one if (null !== $idShop) { $shop = new Shop($idShop); } else { $shop = new Shop(Configuration::get('PS_SHOP_DEFAULT')); } is it not able to find the shop ID or something? 138 times is a lot. It suggests that you have a multishop and that it is set for all shops. Prestasshop isn't handling the situation very nice. So you might consider opening an issue on their Github. For the rest I suggest that you install on the same server a fresh installation of the same Prestashop version. Then you can compare and see whether your values are really unusual for your situation. Link to comment Share on other sites More sharing options...
wzzly Posted April 21, 2021 Author Share Posted April 21, 2021 @musicmaster I did and there they say it's normal as there are probably 138 links in the BO (menu) that need to be loaded. Anybody have any idea what is being called by initHeader on the BO? This takes up the most loading time. I already tried unhooking as much as possible from displayAdminHeader Link to comment Share on other sites More sharing options...
musicmaster Posted April 23, 2021 Share Posted April 23, 2021 Did you also look at the table that lists both Load Time and Querying time? It may very well be that the database is not the most timeconsuming. Link to comment Share on other sites More sharing options...
wzzly Posted April 24, 2021 Author Share Posted April 24, 2021 @musicmaster which table do you mean? Link to comment Share on other sites More sharing options...
musicmaster Posted April 24, 2021 Share Posted April 24, 2021 The first Link to comment Share on other sites More sharing options...
wzzly Posted April 24, 2021 Author Share Posted April 24, 2021 @musicmaster aah ok Thanks for your effort to reply BTW ... I really appreciate it Link to comment Share on other sites More sharing options...
wzzly Posted May 6, 2021 Author Share Posted May 6, 2021 @musicmaster you have any more ideas I could check? On GTmetrix it also says is has long TTFB Link to comment Share on other sites More sharing options...
musicmaster Posted May 6, 2021 Share Posted May 6, 2021 2 hours ago, wzzly said: @musicmaster you have any more ideas I could check? On GTmetrix it also says is has long TTFB GT Metrix is rather critical. If you have a cheap hosting provider you are unlikely to win a prize with them. Did you pay attention to the place from where they measured your site? If it is at the other side of the Atlantic that would explain a lot. Did you also try GTMetrix's competitors such as Google Page Speed, Yahoo Yslow and Pingdom? As the queries aren't the problem on your site it must be the loading of the files. Check that in the Network tab of the browser console. Link to comment Share on other sites More sharing options...
wzzly Posted May 6, 2021 Author Share Posted May 6, 2021 @musicmaster Yes did it on different competitors aswell. In the BO I also notice that when visiting the orders page, the loading of config takes up alot of memory and time. What does that mean? Link to comment Share on other sites More sharing options...
musicmaster Posted May 6, 2021 Share Posted May 6, 2021 8 minutes ago, wzzly said: @musicmaster Yes did it on different competitors aswell. In the BO I also notice that when visiting the orders page, the loading of config takes up alot of memory and time. What does that mean? I have no idea. My suggestion was to look at Network in the Browser console. Did you do that? Link to comment Share on other sites More sharing options...
wzzly Posted May 6, 2021 Author Share Posted May 6, 2021 @musicmaster Yes that also shows TTFB of 9 seconds... Can I get more info on this? The profiler has these timings: Link to comment Share on other sites More sharing options...
wzzly Posted May 6, 2021 Author Share Posted May 6, 2021 @musicmaster maybe I found something? When I look in DevTools on the BO order page, I see this error in my console. And when I check the Network tab, I see that this file: bootstrap-sortable.js is the first thing called.... is that coincidence? Link to comment Share on other sites More sharing options...
musicmaster Posted May 6, 2021 Share Posted May 6, 2021 I don't know how to solve this. Some final suggestions: - have a look at the Waterfall in GTMetrix - what puzzles me with the bootstrap-sortable.js the most is that it comes from an external site. Is that some module you installed? - jQuery errors are unfortunately quite common. In this case one has too wonder whether jquery just isn't loaded yet. Link to comment Share on other sites More sharing options...
wzzly Posted May 6, 2021 Author Share Posted May 6, 2021 @musicmaster Found out that bootstrap-sortable.js is part of the profiler... wierd https://github.com/PrestaShop/PrestaShop-1.6/blob/master/tools/profiling/Controller.php <script type="text/javascript" src="https://cdn.rawgit.com/drvic10k/bootstrap-sortable/1.11.2/Scripts/bootstrap-sortable.js"></script>'; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now