FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  Who is OnlineWho is Online   Join! (free) Join! (free)  
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  • Welcome
  • Guest

Faster forums part eight (php)

 
Post new topic   Reply to topic    myfreeforum.org Forum Index -> Forum Blogs
View previous topic :: View next topic  
Author Message
Please Register and Login to this forum to stop seeing this advertising.






Add Karma

rated by members
Add Comment
Show Comments


online/offline
Posted:     Post subject:

Back to top
myff admin
Site Admin
Site Admin
FLAG

Virtual Cash: 92890

Joined: 22 May 2005
Posts: 32203



Add Karma

rated by 281 members
Add Comment
Show Comments


online/offline
PostPosted: Sat Sep 12, 2009 11:24 am    Post subject: Faster forums part eight (php)  Reply with quote

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.
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums
Back to top
View user's profile Send private message Visit poster's website
myff admin
Site Admin
Site Admin
FLAG

Virtual Cash: 92890

Joined: 22 May 2005
Posts: 32203



Add Karma

rated by 281 members
Add Comment
Show Comments


online/offline
PostPosted: Sat Sep 12, 2009 1:07 pm    Post subject: Reply with quote

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.
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums
Back to top
View user's profile Send private message Visit poster's website
myff admin
Site Admin
Site Admin
FLAG

Virtual Cash: 92890

Joined: 22 May 2005
Posts: 32203



Add Karma

rated by 281 members
Add Comment
Show Comments


online/offline
PostPosted: Sat Sep 12, 2009 1:32 pm    Post subject: Reply with quote

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.


_________________

Family Friendly Shareware | | Web Design/Services | Free Forums
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    myfreeforum.org Forum Index -> Forum Blogs All times are GMT
Page 1 of 1
 
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Card File  Gallery  Forum Archive
Powered by phpBB © 2001, 2005 phpBB Group
Create your own free forum | Buy a domain to use with your forum