ergophobe - 7:51 pm on Feb 12, 2010 (gmt 0)
installing PHP locally is dead easy. If you're on Windows, you can use the WAMP package. If you're on Windows, Mac, Linux or Solaris you can use the Apache Friends XAMPP package (more complete - includes PERL, Sendmail, FTP and more). This gets you up and testing in no time.
As for your other question, I'm not sure. When you reach the <html> tag, is your page fully generated, or are you still at that point running it through a template, substituting variables and on?
A priori, I would guess that you're grabbing part of your page via a database query and that's taking time, but it could be anything. Like I said earlier, a dozen calls to GetImageSize() was bringing my server to its knees just to generate a single page.