FaceBook accélère le PHP

Depuis deux jours des bruits courraient sur le Web, annonçant qu’un développeur de FaceBook avait développé un compilateur PHP et que FaceBook allait le mettre à disposition en opensource.

Et bien aujourd’hui c’est officiel, FaceBook a bien travaillé sur l’amélioration du PHP. Pendant deux ans, Haiping Zhao développeur chez FaceBook  a travaillé seul sur le projet top secret HipHop : «Avec HipHop nous avons réduit l’utilisation du processeur sur nos serveurs Web en moyenne d’environ cinquante pour cent, en fonction de la page. Moins de CPU signifie moins de serveurs, ce qui signifie moins de frais généraux».

PHP est un langage interprété beaucoup moins rapide qu’un langage compilé. L’astuce a consisté à traduire le PHP en C++ . PHP et C++ ont une syntaxe proche, et C++ une fois compilé est moins gourmand en ressources système que PHP.

Lorsque vous affichez votre page d’accueil , le site a  besoin de regarder tous vos amis, interroger leurs mises à jour les plus pertinentes, filtrer les résultats en fonction de vos paramètres personnels, puis remplir les histoires avec commentaires, photos, goûts, et tous les données que les gens aiment. Tout cela en moins d’une seconde.

Au lieu de mettre de l’argent dans des serveurs de plus en plus puissants, il valait donc mieux améliorer les performances de PHP. Résultats atteints (300 000 lignes de code ont été nécessaires).

Free video streaming by Ustream

  1. jpvincent

    je complèterais avec les limites concrètes pour les développeurs :
    Apache et PHP5.3 ne sont pas supportés, et il y a certaines restrictions de language qui tournent autour d’eval(), mais qui du coup peuvent empecher certaines librairies de fonctionner

    et du point de vue optimisation, en général on commence par les accès disque, réseau, et base de données. Mais bon un coup de boost sur le CPU ne peut faire que du bien du moment qu’on est conscient des limites 🙂

  2. yeezy supply

    My husband and i felt so glad when Michael managed to complete his inquiry from the precious recommendations he discovered while using the web pages. It’s not at all simplistic to just possibly be releasing information that people today could have been trying to sell. And we also do understand we need the writer to thank for this. The entire explanations you made, the easy website navigation, the relationships you can give support to instill – it’s got many exceptional, and it’s really assisting our son and the family reason why this subject matter is excellent, which is particularly pressing. Many thanks for everything!

  3. golden goose

    I truly wanted to jot down a small note to be able to thank you for the fantastic points you are showing here. My rather long internet search has finally been honored with awesome facts to go over with my pals. I would state that that most of us visitors actually are quite lucky to dwell in a fabulous community with many wonderful professionals with insightful opinions. I feel pretty happy to have seen the web page and look forward to plenty of more fun minutes reading here. Thank you once more for a lot of things.

  4. supreme hoodie

    I wanted to type a small message so as to say thanks to you for those awesome solutions you are sharing here. My long internet look up has at the end of the day been recognized with really good concept to exchange with my contacts. I ‘d say that we visitors are quite endowed to exist in a perfect place with many wonderful individuals with great ideas. I feel rather lucky to have seen the webpages and look forward to so many more excellent moments reading here. Thank you again for a lot of things.

  5. bape hoodie

    Thank you for all of your work on this site. Betty really likes carrying out internet research and it is obvious why. My spouse and i know all regarding the compelling manner you make worthwhile guides via the blog and in addition invigorate contribution from some others on this point and my girl is actually learning a lot of things. Take advantage of the remaining portion of the year. You’re performing a tremendous job.

  6. golden goose sneakers

    I must voice my love for your generosity in support of people that should have guidance on your field. Your personal commitment to getting the message around turned out to be extraordinarily useful and have truly empowered regular people just like me to achieve their dreams. Your helpful suggestions implies much to me and further more to my colleagues. Thanks a ton; from all of us.

  7. yeezy 350

    I have to express my passion for your kindness for men and women who absolutely need help with this particular topic. Your special commitment to passing the message throughout had been incredibly helpful and have specifically encouraged ladies like me to attain their endeavors. Your own valuable facts implies this much a person like me and even further to my peers. Best wishes; from each one of us.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.