Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 


       myfreeforum.org Forum Index -> Forum Blogs
myff admin

Faster forums part eight (php)

This is not something we can do a lot about until we do go down the new server road, which will allow us to run code exclusively tailored to the forums alone.

But when I was benchmarking forums looking to improve upon database access times, it was quite apparent that when a forum gets displayed with the database doing well, e.g. queries coming from cache etc, then the bulk of the time taken in showing a forum is in the php code.

php really is awfully slow, of course 2 or 3 hundredths of a second spend in php does not seem slow to the user, but in raw computing terms that time should be a small fraction of that.

Even decoding our new cookie system is taking thousandths of a second. If I coded it in 'c' it would take more like a millionth!

It will be interesting to look at:

http://www.roadsend.com/home/index.php?pageID=compiler

to try and deal with this.
myff admin

That tech does seem rather bleeding edge, and back in the real world 1/20th of a second to generate a page is not really that big a deal, and the php part of that is pretty much a constant, when performance issues hit that factor is dwarfed by database access times.

All the same it may be fun to play with the tech. It might be trustworthy for some uses. They do in fact run phpbb2 on it, but that would be vanilla phpbb2 a far cry from what we run.
myff admin

The benchmark page is not really that impressive.

http://www.roadsend.com/home/index.php?pageID=benchmarks

It does strike me that compiling php is not enough in of itself.

Take my cookie code as an example, it's speed has two limiting factors.

1) The interpreted php loop.
2) The number of php inbuilt function calls it makes.

The loop will be a little painful, the functions will go blindingly fast, and cannot be improved by compiling as they are already compiled.

The problem with the code is that it makes those calls at all. The calls are made because code to do the job more sensibly would as it stands be interpreted php code. I could perhaps decode with 4x the slickness but it would not go 4x faster, it would go 4x slower   Of course such code with the compiler in place aught to reverse that and be 4x faster, but no one has ever coded php with a compiler in mind, so all the code does what works well with the interpreter.

When I download this I think I will make the cookie code the test of it.

       myfreeforum.org Forum Index -> Forum Blogs
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum