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
                   2010-10-02 22:48:15
                
              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
                   2010-10-02 22:49:11
                I'm assuming freezing means it takes some extra time for the request to be processed. Server side, not client side.
                  Adam
                   2010-10-02 22:51:52
                
                +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
                   2010-10-02 22:57:34
                
              +1, and Firebug is also wonderful when profiling the website speed, with its addon: HttpFox
                  Michael Mao
                   2010-10-02 23:32:55
                @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
                   2010-10-03 10:44:48
                
                
                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
                   2010-10-02 23:03:11
                
              
                
                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
                   2010-10-03 16:06:53