views:

50

answers:

4

I'm working on a Wordpress-powered website (hasn't gone live yet). Most of the time when I load the home page it's fine. Sometimes, however, it freezes for a second on load, before continuing as normal. How do I debug this issue?

A: 

Are you testing it on a server or locally?

I've encountered this while developing on a local server, and it's the database access lag usually.

Adam
The page wouldn't **freeze** because of database lag, rather it would load slower.. **freezing** to me indicates that the whole browser becomes non-responsive.
Marko
I'm assuming freezing means it takes some extra time for the request to be processed. Server side, not client side.
Adam
+2  A: 

First I would profile your php performance with:

  • xdebug using external tools like cachegrind

Next I would also do some base tests with:

Alfred
+1, and Firebug is also wonderful when profiling the website speed, with its addon: HttpFox
Michael Mao
@Mao O man I forget to mention firebug, but you need it to use Yslow and I also believe google page speed! +thanks for +1
Alfred
A: 

Chrome has a developer tool that lets you profile the page and see how much time the browser spends on different things. Its located under developer tools and is called timelines.
I think firebug for firefox can do the same but I have never used that.

Tjelle
A: 

Big external resources that require a reflow may block content. Look for complex javascripts and embedded fonts in addition to your general performance analysis.

toscho