Site Software UpdateSubscribe to this blog RSS Feed
    You must be logged in and belong to this group to post to this forum.
    1 of 1
    7 years ago
    As some of you may have noticed, the site has been running pretty slowly of late. We're running on top of a platform built by Facebook called HipHopVM, a.k.a. hhvm, which is a much much faster implementation of the PHP language all my stuff is built in.

    Unfortunately, the last few releases of hhvm have had a pretty nasty bug where some features that I was making use of extensively were causing massive slowdowns. These features are ones that Facebook doesn't use and as a result are not particular interested in fixing.  

    As a result, I had to make a pretty major deep internal change to my software which may break things in unusual ways. I /think/ it's working correctly but I have not yet checked every last feature of the site.

    For the geeks in the crowd, I created a language of my own called the formVista Markup Language, a.k.a. FVML, which itself is written in PHP. So  I write in FVML which is then interpreted in PHP. As part of that language, I wrote my own expression parser where I reduce expressions down to constant strings which I then threw at the risky PHP eval() method solely for mathematical and boolean constant string evaluations. 

    Facebook doesn't believe in eval() which is fair since most uses of eval lead to nasty security holes. Back in the day, running on stock PHP, all pure PHP expression parsers were simply too slow to use (leading to page load times in the 10's of seconds). 

    But now, HHVM is actually fast enough to run pure PHP expression evaluation code so I've replaced the two calls of eval() with the Symfony Expression Engine. Interestingly, it was a drop in replacement and is exceptionally well done. This /should/ avoid the massive load spikes and slowdowns we've been seeing due to the hhvm bug but unfortunately the Symfony Expression Engine is not quite as efficient as eval() so we have taken a slight hit on page load times, to the tune of about 200ms in my off the cuff tests. 
      formVistaTM By: Flying Brick Software, LLC
      formVista generated this page in: 0.7333 seconds
      using '4194304' bytes of memory