We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8822
    • 203 Posts
    I am really struggling with the performance of my website, with it taking 3 seconds to display each page. I believe that the problems lies with the fact that i have a right column structure which is made up of a series of sections that the content editor can define/select. I have done this by placing a call to a TV in my template [[*submenu]]. The TV *submenu, defined as a checkbox, has a call in the 'input options values' field to a chunk, i.e Yes==[[$submenu]] - the chunk will either use getresources to get the content from a resource, have static code in it, or use wayfinder to generate a submenu. This allows the editor to use a series of checkboxes to define the content of their right column on a per page basis.

    However............this is obviously having a bit hit on performance, so is there a better way to do this?

    Thanks for any tips smiley
      • 4172
      • 5,888 Posts
      what is the content of your chunk submenue? Your code?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 8822
        • 203 Posts
        Well, i have about 10 of the TVs called from the template, each TV calling a different chunk, below are some examples of what the chunk code is for the chunks called by these TVs:

        Example 1
        <div class="rightcolumnsection">
           <h1> Quick Links </h1>
           [[Wayfinder? &startId=`[[UltimateParent]]` &level=`1` ]]
        </div>


        Example 2
        <div class="rightcolumnsection">
          [[getResourceField? &id=`16` &field=`content`]] 
        </div>


        Example 3
        <div class="rightcolumnsection">
          [[*freetextcontent]]
        </div>


        Example 4
        <div class="rightcolumnsection">
           <h1> In the news </h1>
           <ul>
           [[getResources? &showHidden=`1` &parents=`44` &tpl=`newslistsummarytpl` &limit=`3` ]]
           </ul>
        </div>


        my concern is that although the TVs are called from the template, if the check box on the resource is not checked by the content editor, then that TV is not displayed - could this be causing the slowness?

        Thanks for taking a look smiley
          • 4172
          • 5,888 Posts
          Is it slow only the first time, before it is cached, or is it also slow after the page has been cached?

          unchecked (empty) TV - values shouldn't make performance - issues.

          But you can try it out by removing all TVs and put some of your chunk - codes directly into your template, if that makes any difference.

          Can't you put all chunk-tags into the inputoptions of one checkbox-TV?

          [ed. note: Bruno17 last edited this post 13 years, 10 months ago.]
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 34084 ☆ A M B ☆
            • 756 Posts
            Might also be worth checking your system ram, Revo recommends 64Mb of allocated ram to run optimally. I have had other sites on smaller servers that had some performance issues when the allocation was set lower.

            Cheers
              Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
              Visit CharlesMx.com for latest news and status updates.
              • 8822
              • 203 Posts
              Hi, thanks for your responses - Bruno17 you were absolutely right, not sure why i hadn't put all the chunk tags into the same checkbox TV!!! I have done that now though and also found an uncached submenu call which has definitely improved things on the second time a page is visited (less than a second), but it is still a good 2-3 second delay the first time a page is displayed - not sure if there is anything i can do about that now though is there?

              Will have a look at system RAM Charles, thanks for info....
                • 38339
                • 41 Posts
                Hi Emily

                have you read this thread? give-modx-some-speed
                There are some general hints to speed up MODX.
                  Revolution 2.2.6
                  • 1343 ☆ A M B ☆
                  • 2,213 Posts
                  I would also suggest looking into http://modx.com/extras/package/xfpc, granted if your server is overloaded that can also delay things. I would make sure you have a solid hosting provider.
                    Patrick | Server Wrangler
                    About Me: Website | Tweets |  MODX Hosting
                    • 8822
                    • 203 Posts
                    Thanks for all your comments folks - i have installed xfpc and it makes a huge difference on cached pages, amazing ! It still take a couple of seconds to load each page for the first time, but definitely better than it was smiley
                      • 1343 ☆ A M B ☆
                      • 2,213 Posts
                      I'm glad to hear xFPC helped with the load issues, however it still shouldn't take that long for the initial load. If you could tell us more about your hosting, and what addons you are using we can reduce the load time further.
                        Patrick | Server Wrangler
                        About Me: Website | Tweets |  MODX Hosting