User:Deskana (WMF)/HipHop

From mediawiki.org

HipHop is... something.

What will HipHop do for our end users?[edit]

MediaWiki is written in PHP, a language that is interpreted at run-time. The overhead of running this PHP code every time some views a page necessitates the usage of caching servers, running software such as Varnish, which cache the HTML generated by running this PHP, so that the PHP does not have to run every time a page is viewed. These caches only serve users that are not logged in[1]. Actions which are not affected by the cache, and therefore are affected by the run time of PHP code, include:

  • Any page you view while logged in.
  • Saving pages that you've edited, whether you are logged in or not.

Therefore, any action we can take to reduce the time it takes for MediaWiki's PHP code will therefore also decrease the loading times of our site for all of our logged in users and anyone who edits anonymously.

HipHop was written to be a faster, more efficient PHP interpreter than our current interpreter (Zend). It is our hope that by implementing HipHop as a replacement for Zend, our users will notice a tangible increase in the performance of our sites.

How does our development work on HipHop affect MediaWiki developers?[edit]

In our initial sprint of work, due to be finished at the end of March 2014, we hope to make it so that anyone can elect to use HipHop on Beta Labs instead of Zend. This will be on a totally opt-in basis which can be disabled at any time. This will allow the MediaWiki Core team to gauge the performance of HipHop against that of Zend directly using our current test infrastructure, instead of just estimating theoretical performance increases. It will also create a development environment that will help us see how much work is needed to make HipHop compatible with MediaWiki, and as such let us create an estimate for how long it will take us to get HipHop live on production as a full replacement for Zend.

For other MediaWiki developers, the consequence of HipHop being deployed in this manner is that if they are using the Beta Cluster as a test environment, they will find it trivial to test how their patches perform using HipHop instead of Zend if they wish to. However, to minimise the disruption of our work, the opt-in nature of the infrastructure will allow developers will be able to continue to develop totally agnostic of the future HipHop migration if they wish to do so.

Footnotes[edit]

  1. ↑ By definition, users that are logged in cannot be served pages from a static cache, as the page served to them must include user-specific HTML such as their username at the top right of the page. This, unfortunately, creates a situation where simply logging in causes a tangible decrease in how well our sites perform for you.

Random sentences that are cool but don't fit in the document[edit]

A major obstacle to making our sites more interactive is the necessity of these caching servers. At the same time, this desire for interactiveness must be balanced with our awareness of the performance impact that interpreting PHP has.