Optimizing PHP code

Xavier De Cock (17.Feb.2010)
Talk at Symfony Live Conference 2010 (English - US)

Rating: 4 of 5

PHP is a powerfull language, and his Zend Engine has a lot of powerfull feature but
also some performance problems. You need to avoid some of those problems if you are searching
performances. The goal will be to show you how PHP works inside and how you could avoid the penalty
of some part of the Zend Engine. This starting from small and quick hacks up to major changes
on how to handle problems.

Who are you?

Claim talk

By clicking this button you are declaring that you are the speaker responsible for it and a claim request will be sent to the administrator of the event.

If the claim is approved you will be able to edit the information for this talk.

Are you sure?

 
Comments closed.

Comments

Rating: 5 of 5

17.Feb.2010 at 14:45 by Daniel Vuilleumier

Interesting to hear and very competent, though I assume we do not need to optimize this far for normal web apps or websites! Thanks.

Rating: 4 of 5

18.Feb.2010 at 10:48 by Christian Morgan

It was interesting and well delivered, but... I imagine that the vast majority of symfony users have bigger bottlenecks than PHP concatenation and "for .vs. while" (although some of the array functions can quickly get out of hand).

I hope the core team was paying attention so that Doctrine 2.0 and Symfony 2.0 can be as quick as possible!

Speaker comment:

18.Feb.2010 at 19:53 by Xavier De Cock

I'll do a review of the core, but even if the code is not 100% optimized it's not critical, as usual, even if the core it's only a subsection of the code that might cause problems.

Rating: 3 of 5

18.Feb.2010 at 21:24 by Evert Harmeling

Sure makes you think about coding in the future, gonna scratch the back of my head when I want to use array_* functions ;)

Rating: 1 of 5

19.Feb.2010 at 10:12 by Gunnar Lium

I found this talk to be completely irrelevant for a Symfony conference. If you're using Symfony, this is not what you should focus on. Might be relevant for a "Symfony core team"-conference, unless they already know this stuff.

Rating: 5 of 5

19.Feb.2010 at 17:00 by Pablo Godel

very interesting talk with some good insight into optimizing PHP code. Probably not useful for most people but really good to see that there is ways to get some extra juice when you think there is nothing else to do.

Rating: 4 of 5

19.Feb.2010 at 17:31 by Pavel Campr

nice information "behind the scene", helps to understand the basics on which symfony and our projects are build

Speaker comment:

19.Feb.2010 at 20:38 by Xavier De Cock

I don't see the point of "I use a framework" so, I don't need to optimize computation intensive work i do, Let says, you're making a bundle for Sf2 for example...

You need to do some work, and make poor choice on the algorithm part and function used for your module to do the work.

People without any idea of "how it works" will simply say: php is a bad langage or symfony is a bad framework.

Understanding weakness of something is IMHO important, so we can avoid or circumvent most of those weakness.

Symfony might be as performant as needed, what you do with it can still result in a really bad performances application.

You might maybe remember, that even mysql that is a quite fast system when you know how it work can be missused and deliver terrible performances.

PHP is not a performance silver bullet, Mysql is not a silver bullet, Symfony neither.

What i was trying to give to everybody was two things:
1/ tools to use when you try to understand what goes wrong
2/ knowledge of "how it works", so that you can understand why it goes wrong

Rating: 4 of 5

21.Feb.2010 at 11:46 by

Very interesting.
Maybe you could talk a bit about profiling (which part of code to optimize)

Cloud server hosting by Combell Combell      © Joind.in 2012