I noticed today and yesterday that running my site on local host is very slow. I highly doubt this is a code issue as when I put it up on my live site it went fast.
Not sure if this might be it but I had a similar problem a while ago when I was making json requests with ajax. It took nearly 500 ms seconds, after the fix it took only 10-20 ms.