We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24962
    • 18 Posts
    I have set up the following website in ModX and it's running really slowly. I would very much appreciate any help/guidance/suggestions on how to improve it.

    Website URL: http://tiny.cc/2o4hgw
    ModX Version: Revolution 2.1.3-pl (traditional)
    Server: Apache version 2.2.19
    PHP Version: 5.2.17

    What other details do you need?

    Thank you.
      • 22303 MODX Staff
      • 10,725 Posts
      Make sure you are caching everything you can.
        • 33983 ☆ A M B ☆
        • 181 Posts
        1. Look into the getCache extra: http://www.jasoncoward.com/technology/2010/10/simple-content-caching-with-getcache.html and the extra page: http://modx.com/extras/package/getcache.

        2. If that does not work for you look into SuperCache: http://modx.com/extras/package/supercache

        Are you able to update to 2.2.4? It has some performance advantages over the version that you have.

        Other things to consider are can you simplify(refactor) your templates code? Like reduce the number of conditionals.
          • 10208 ☆ A M B ☆
          • 1,780 Posts
          Try moving your javascripts to the footer. For reasons unknown to me, having them in the head really slows down my MODX sites.
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 1343 ☆ A M B ☆
            • 2,213 Posts
            Hello,

            I took a quick look at your site and your speed issues are centering around the generation of the page, while the server does take some time to send the files to the client. The main issue centers around MODX and/or how php is configured on your server.

            The others are correct in that you want to cache everything, especially Wayfinder. getCache can help with getResources, and general caching of everything else in general.

            Frogabog's suggestion is another good one, as all the javascript needs to load before the page will render if I recall correctly. Granted it's not going to cause 19 seconds of delay in loading the main page, which is your issue.

            If you can tell us some about how your server is configured to interact with php that would be helpful, in addition to caching everything. You can also try switching out more complex uses of output filters for cached "if" calls, which should help more as well.

            You can use http://tools.pingdom.com/fpt/ to test where things are being delayed, to a degree.
              Patrick | Server Wrangler
              About Me: Website | Tweets |  MODX Hosting
              • 10208 ☆ A M B ☆
              • 1,780 Posts
              Quote from: AMDbuilder at Jun 26, 2012, 08:20 PM
              Granted it's not going to cause 19 seconds of delay in loading the main page, which is your issue.

              FWIW, moving just a few lines of javascript out of the head has shaved off around 15 seconds of load time the last time I made such a change. Huge difference in loading. Now said page loads in less than 1 second.

                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 1343 ☆ A M B ☆
                • 2,213 Posts
                That's very interesting, did you use ajax on the site to pull in content from multiple pages, or an off-site source that may have been slow to respond? I have seen openx hosted ads add a 5-8 second delay to the page rendering time (granted that's a client side delay). The problem there was the client using individual calls instead of the unified call for serving the ads.
                  Patrick | Server Wrangler
                  About Me: Website | Tweets |  MODX Hosting
                  • 24962
                  • 18 Posts
                  Thank you all for the suggestions. I'll try them out this morning & let you know how I get on.

                  AMDBuilder - what do you mean about 'how your server interacts with php'? Sorry, bit of a newbie with server stuff.

                    • 1343 ☆ A M B ☆
                    • 2,213 Posts
                    Hello,

                    You can configure apache to interact differently with php, for example cgi, fastcgi, dso, suphp, phpsuexec. The different methods have different pros/cons.

                    If it's a shared server you will have no control over this, a VPS or Dedicated server you would have control over this factor.
                      Patrick | Server Wrangler
                      About Me: Website | Tweets |  MODX Hosting
                      • 24962
                      • 18 Posts
                      I have the site set up on both a dedicated and shared server with two different hosting companies to rule out whether the host was the issue & the site is equally slow in both. Does that help?