We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26039
    • 4 Posts
    Hello there,

    Firstly, I love MODx! However... I was wondering if I could get some answers (or I guess give some affirmation) about some speed issues that I site I have built is experiencing - Info:

    MODx Revolution 2.0.6-pl2 (traditional) hosted on a Fasthosts Shared Server
    Linux Apache 2.2.3
    PHP 5.2.14
    MySQL 5.1.50
    No tables over 1mb, modx_session is close at 913kb

    I’m using firefox 3.6.15 but the issue does seem to spread across all browsers.


    The issue is that the site tends to hang for a varied amount of time before rendering a page (all pages). As in there’s a white screen with the loading icon going for between 2-12 seconds before any content seems to get through. This site is fairly complex using jQuery and ajax calls (although the script is minified to 27kb) so this was initially my concern, however once the whitescreen is passed, the site performs fast, and the hang tends to be before the javascript even has a chance to go. I’ve optimised the site with YSlow as reference and it’s now graded A (or sometimes B depending on how it interprets the google scripts :\) . I’ve done a little research on the forums to try and find some info and found a script you guys suggested for testing PHP/MySQL speeds with pretty varied results:

    <!--MySQL: 0.0000 s, 0 request(s), PHP: 9.1417 s, total: 9.1417 s, document retrieved from cache. -->
    <!--MySQL: 0.0000 s, 0 request(s), PHP: 1.3323 s, total: 1.3323 s, document retrieved from cache. -->
    <!--MySQL: 0.0000 s, 0 request(s), PHP: 4.4313 s, total: 4.4313 s, document retrieved from cache. -->
    <!--MySQL: 0.0000 s, 0 request(s), PHP: 4.7466 s, total: 4.7466 s, document retrieved from cache. -->


    The Net panel within FF shows the average load time is usually about 2-3 seconds more than the above results, which makes sense.

    So really my question is what could be causing this, or is this time normal even? I don’t believe it is, I have another site running on the same MODx version and the PHP goes in less than a second every time. My suspicions are that on the shared server the varied CPU load is causing the scripts to have different load times, would this be the case? I’m just trying to really nail the issue before I 100% recommend upgrading their servers, as you can understand if it makes no difference they’re not going to be very happy.

    On the backend, things also load very slow - one particular issue is when trying to clear the cache, the console hangs indefinitely, and the cache isn’t cleared, maybe a potential clue to the issue?

    Thanks a lot for your time

    Sam smiley



      • 26016
      • 561 Posts
      Hi,
      That’s a great looking site. It is pulling some weight, what with the fancy graphics, sliders, and Ajax in general. I was thinking even Cufon could be a small bottleneck.

      You have a couple of feeds at the bottom. I wonder if those in particular are slowing you down... I answer questions on the Wordpress forum, and people there are feed-crazy, and their sites often wait and wait for their 8 feeds to appear, and unfortunately, there’s less ability to control that end.

      As I’m told, newer Revo might have a little performance boost, but the jury’s still out on that.

      That’s all I can think of from an application end. Let’s see what server people say.

      Cheers, Dave
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 22303 MODX Staff
        • 10,725 Posts
        You should definitely upgrade to 2.0.8 — there is a significant performance increase in that release that affects all cached pages.

        That said, are you caching everything on your pages, or are their things you are calling uncached? And if so, why?
          • 33968
          • 863 Posts
          Seems your pages are cached... but 9 seconds PHP response is very strange.

          Are you able to reproduce the site on a local/development server and see if it has the same issues? At least that way you can rule out a hosting issue.
            • 22303 MODX Staff
            • 10,725 Posts
            The page may be cacheable, but is every snippet that can be cached also cacheable?
              • 26039
              • 4 Posts
              Hello all, thanks for the replies.

              I agree 9 seconds response does appear strange. Almost all snippets are cached, apart from one very small snippet which uses a GET value. Speed tests with this snippet removed show very little/no difference. We’re going to upgrade as suggested to the latest release later on today. In the meantime I am setting the site up locally as well to try and rule out server issues (or identify them). I’ll post how we get on.

              Thanks again.
                • 22303 MODX Staff
                • 10,725 Posts
                If it’s taking 9 seconds with everything cached and no crazy plugins executing on every request, then you likely have a hosting environment problem.
                  • 26039
                  • 4 Posts
                  Ok, thanks for all your help/suggestions.

                  After an upgrade and a clearing of the cache I’m happy to say speeds have increased pretty substantially. The "hang" appears to have disappeared. The PHP averages around 1 to 1.2 seconds now, which is much, much better. Thanks! smiley