We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38593
    • 129 Posts
    I was wondering if anyone in the community has tried running MODX using HHVM instead of good old PHP?

    I didn't see it on HHVM's list of compatible frameworks yet (nor on there list of frameworks under going testing).
      Pedalers Bicycle Tours my website forged with MODX
      vandergraaf-M static website generator for MODX
      • 41472 ☆ A M B ☆
      • 16 Posts
      Hi! I testing it now. But have an error on setup with creating tables. What about u?
        • 38593
        • 129 Posts
        Sorry, but I never gave it a try.

        Nobody posted any responses about success using it and since my skills are not strong enough to mess with the core or other bits that might need tweaking to make it work, I put the idea on the back burner and pursued other angles to speed up my website.
          Pedalers Bicycle Tours my website forged with MODX
          vandergraaf-M static website generator for MODX
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Call snippets cached whenever possible, especially listing snippets like Wayfinder and getResources. Use pdoTools and its pdoMenu and pdoResources instead.

          Avoid nested "if" snippets and excessive conditional output in general. Usually if you have more than 2 conditions use a custom snippet rather than nested "if" snippets or long chains of output modifiers.

          Use a PHP caching mechanism, such as APC or OPcache.

          Use a CDN like CloudFlare for your images and other web resources.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 38593
            • 129 Posts
            Susan I am assuming your post was in regard to my comment about pursuing other speed up aspects, not HHVM.

            What I ended up doing was converting most of my MODX pages to cached versions, even though their content changes daily (sometime more frequently). I created a php script that deletes the cache file for each product page and then calls that page so it is rebuilt to cache. A cron job runs that script at 3 am each day. I also evoke the script for individual pages when someone "buys" that product and changes the availability of items. This way most of my pages are served as "static" from the MODX cache.

            I thought about taking it one step further and move MODX into a separate folder and using it as a page generator rather than server. Using a similar concept, call each page, run a bit of minification on it (mostly comment & white space removal) then store it as a totally static html file in the public website directory. But the multiplicity of files involved with the blog section made creating the refresh list a bit more complex.

            Plus I also did some improvements outside MODX, moving images, js and css to a CDN (as you touched on), replacing jQuery with a much smaller vanilla javascript, minimizing image file size, etc. And have to say we are happy with the results, page load times for a fairly long, very image heavy page are around 600ms in the US, 1.2s in Europe, 4.5s in Australasia (Singapore & Sydney tests).
              Pedalers Bicycle Tours my website forged with MODX
              vandergraaf-M static website generator for MODX
              • 41472 ☆ A M B ☆
              • 16 Posts
              Hm. Susan say right things, but real test with Wordpress showed 9x faster result between php and hhvm. So, if it interested for community, I continiue this theme on GitHub, because subject of post is good for collective discussion.
              P. S. Sorry my bad and incorrect English tongue it isn't my native language but I am so lazy for use translator
                • 50153
                • 1 Posts
                Users of our hosting uses HHVM for MODX. And they has problems with updating to the latest version (of MODX), while the HHVM is really required due to performance issues.
                  • 41472 ☆ A M B ☆
                  • 16 Posts
                  Quote from: xaionaro at Mar 25, 2015, 10:35 AM
                  Users of our hosting uses HHVM for MODX. And they has problems with updating to the latest version (of MODX), while the HHVM is really required due to performance issues.
                  Hmmm… I cann't run MODX on HHVM because get xPDO error on setup, when wizard try to create BD tables.
                    • 33337
                    • 3,975 Posts
                    Quote from: realetive at Mar 25, 2015, 11:36 AM
                    Quote from: xaionaro at Mar 25, 2015, 10:35 AM
                    Users of our hosting uses HHVM for MODX. And they has problems with updating to the latest version (of MODX), while the HHVM is really required due to performance issues.
                    Hmmm… I cann't run MODX on HHVM because get xPDO error on setup, when wizard try to create BD tables.
                    Did you ever resolve it?

                    Attaching screenshot for reference on failing step. [ed. note: zaigham last edited this post 11 years, 5 months ago.]
                      Zaigham R - MODX Professional | Skype | Email | Twitter

                      Digging the interwebs for #MODX gems and bringing it to you. modx.link