TTFB issues

Hey all.

Thanks for all the help on my earliest post about Redis/stunnel!

So, I’ve optimized some things, have ensured caching is in place, http2 is on, opcache is configured, etc. What appears to be killing page load times now is TTFB (time to first byte). The home page is .9s ttfb, some deeper pages are much as 4s. By the way, this is a store with maybe 50 products. So, shouldn’t be too crazy in terms of processing.

I’ve gotten so far (with help of this subreddit) to turn on HTML debugging such that it profiles code execution at the bottom of the page. So, at least I know the problem is in a couple of templates in the layout. I’m going through those templates and I’m seeing what looks like PHP code interleaved in the template HTML. Looks like the old devs created some custom helper classes and authentication (oauth2) classes and I suspect that’s where the issue is coming from.

However, I haven’t gotten a dev environment setup or things configured well enough where I can step through the code, so I’m looking for a way to better profile the code- to really see where the timing problem is stemming from.

Is there something like a Debugbar for Magento? Thinking about the overlays that sit at the top/bottom of the page in dev mode and provide stack traces, queries, etc.

Well, thanks for all the pointers, do appreciate it!

submitted by /u/kwisatzcraperach
[link] [comments]