Re: Couple of beginner questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 9, 2009 at 3:22 PM,  <ceo@xxxxxxxxx> wrote:
>
> The slowdown of just running raw HTML through PHP was once benchmarked as about 5 to 10 %.
>
> You could, in theory, use .htaccess and <Files> to ForceType specific .html files as PHP, while leaving the rest of your .html files as static.
>
> I am not recommending this, just being pedantic. :-)
>
> Definitely better to either do them all and take performance hit, which is probably irrelevant to a beginner, or plan better now and strip .xyz from the URLs.
>
> ymmv.
>
> Personally, I've been quite happy for over a decade running all .html through PHP, on 99% of the sites I work on.
>
> If it's big enough to *need* static content, they usually have already gone the route of CDN and have static HTML off on those nodes anyway, in my limited experience.

I was just talking myself.  I use objects and such so I'm really not
as worried about performance either.  But it was a "downside" that I
knew about from some css/js stuff I'd done a while ago.  I still had 2
files on my box from some framework stuff I'd been messing with.  Here
were some results from my local testing (from the Yii framework).


-- index.html --
$ cat index.html
hello world

$ ab -t 30 -c 50 http://localhost/benchmarks/baseline/index.html
Requests per second:    631.07 [#/sec] (mean)
Time per request:       79.23 [ms] (mean)
Time per request:       1.58 [ms] (mean, across all concurrent requests)


-- index.php --
$ cat index.php
<?php echo "hello world" ?>

$ ab -t 30 -c 50 http://localhost/benchmarks/baseline/index.php
Requests per second:    358.21 [#/sec] (mean)
Time per request:       139.58 [ms] (mean)
Time per request:       2.79 [ms] (mean, across all concurrent requests)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux