Make infoarena compatible with HPHP.
Review Request #182 - Created Dec. 15, 2011 and submitted
Information | |
---|---|
Bogdan-Cristian Tătăroiu | |
infoarena | |
Reviewers | |
hackers | |
- Implemented APC caching support since eaccelerator is not compatible with HPHP and although we support memcached, we do not use it on live. - Replaced instances of create_function_cached with php anonymous functions. This bumps the PHP version requirement to 5.3, but it allows the code to work with HPHP, since dynamic function generation is replaced with staticly analyzable functions. This also removes a horrible, terrible hack in Textile.php which was storing the current instance of the Textile class being processed as a static variable so that it could be accessed by anonymous functions. - Replaced occurrences of assert with log_assert. - When running under HPHP, IA_HPHP_ENV is defined and is used to bypass some incompatible code (redundant ini configuration checks). - Fixed some includes that were dependent on the working directory being www/ - Included a sample HPHP configuration file and a Makefile with compilation commands.
Issues
- 2
- 1
- 1
- 4
Description | From | Last Updated |
---|---|---|
This causes a crash on the site if the IA_HPHP_ENV is not defined. change it to: if (defined('IA_HPHP_ENV')) maybe? | Adrian Budau | |
why? what if you want to cache a function that's very cpu expensive that sometimes returns false?. Looks to me ... | Savin Tiberiu |
-
trunk/www/identity.php (Diff revision 1) -
This causes a crash on the site if the IA_HPHP_ENV is not defined. change it to: if (defined('IA_HPHP_ENV')) maybe?
Ship It!
Review request changed
Change Summary:
Fixed IA_HPHP_ENV error Updated Makefile compilation command for a speed boost
Description: |
|
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+325 -150) |
Review request changed
Change Summary:
Fixed small bug that appeared at deployment with the rankings macro.
Diff: |
Revision 3 (+326 -150) |
---|
-
trunk/common/cache.php (Diff revision 3) -
why? what if you want to cache a function that's very cpu expensive that sometimes returns false?. Looks to me like this could generate a ton of errors.
-
trunk/hphp/config.hdf.sample (Diff revision 3) -
65 what? MB? KB?
-
trunk/www/config.php (Diff revision 3) -
why?? does hphp not support more or what?
Looks good. Good job :)
You could mark it as submitted. It shouldn't stay in active reviewboard requests.