Re: [PHP4BETA] Wacky Performance Problem w/ Windows
[email protected] (Steve Langasek) Thu, 1 Jun 2000 18:49:31 -0500 (CDT)
| Newsgroups | php.version4 |
|---|---|
| Message-ID | <Pine.LNX.4.10.10006011805220.22347-100000@tennyson.netexpress.net> |
On Thu, 1 Jun 2000, Joel Roller wrote: > > > Leaving aside the fact that IIS4/isapi php is so much slower for a > > > sec.. Php4 on windows parses php (stuff within <? tags ?>) between 2 > > > and 5 times faster than html. > > > I have tried IIS4/isapi, IIS4/cgi, Apache/cgi, all on windows, and get > > > the same results: File 2 is much faster than File 1. And all are > > > around 50 times slower than the same file on linux/apache/mod_php. >> What happens if you set up IIS4 with neither PHP ISAPI, nor PHP cgi? Are the >> speeds for flat HTML files still comparable to what you see when PHP is >> loaded? >> > I'm sorry, I've got a way of writing confusing things. Of course, I meant to > say that I'm running all these files through a .php extension bound to the php > engine. The raw performance of .html files is not an issue -- I haven't even > bothered to test such things as I couldn't imagine them being affected. I don't > plan on using many of them in the near future, anyway, if I could only get php > working properly. > My problem is that the raw html in a .php page seems to be gumming up the entire > parsing or scanning, or whatever it is that php does when its reading through a > page. I've got a homepage with 50k of html intermixed with a few dozen php > commands here and there, database calls, etc. First thing I did was take out > the huge blocks of html, and put them in seperate files, called with > readfile(). That more than doubled the speed of the page, then putting all > other blocks of html within print statements doubled it again. It seems to me, > that none of this messyfussin around should be necessary. Hmm. Well, that makes a little more sense, at least. I still don't pretend to understand why there would be such performance problems under Win32. I do see some Win32-specific code in main.c (UpdateIniFromRegistry)... is the registry really that slow under Windows? Even if it were, I don't see any reason why plain HTML would be that much slower than PHP. I guess this would have to be a bug in the Zend compiler? Steve Langasek postmodern programmer