We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36112
    • 24 Posts
    I have a problem.. One of my websites are taking ages to load, don't really know why, I've been trying everything to get the load time down.. Started at over 20sec, now I'm down to 16!..

    I have reason to belive that this has something to do with the modx revo install?!... Because when i load the template without modx it loads as normal.. 1-2sec.. Anyone have any ideas?

    See ping log (click test now) and you can see what Iæm struggling with

    http://tools.pingdom.com/fpt/#!/HlCThEyvR/http://www.suppli.no
      • 22840
      • 1,572 Posts
      It appears to be the images that are taking time to load, make sure they are optomised for web. Also what calls do you have on that page ( ie snippets etc ) and are they being called cached or none cached ?

      Where is the site hosted and what is the server setup ?

      Anything in the error log ?

      What version of modx, but I don't believe its a modx problem as one of my revo sites I've just tested is loading in 929ms.

      The more info you give the quicker we can get it sorted
        • 3749
        • 24,544 Posts
        What snippet tags are in the template and what plugins are running?

        Do you have a lot of Template Variables?
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 32316
          • 387 Posts
          I see this error when checking with the network tab of Safari (webkit) development tools:

          ReferenceError: Can't find variable: Cufon /:369

            • 36112
            • 24 Posts
            Thanks for the quick replies!

            Cufon (Museo) was a font used earlier in this theme, I removed it to get the load time down.. Maby I did'nt remove it all?

            All images are optimized for web, and most of them is between 10-50kb so that shouldnt be the issue.

            My index file looks like this
            [[$headerContent]]
            
            <div id="wrap">
            
            <div id="header">
            
            <!-- ///   HEADER   /// -->
            
            [[$headerLogo]]	
            [[$navigationBlock]]	
            
            </div><!-- end .col-700 -->	
            
            </div><!-- end .row -->
            
            [[$productCycle]]
            
            <!-- ///////////////// -->
            
            </div><!-- end #header -->
            <div id="content">
            
            <!-- ///   CONTENT   /// -->
            
            <div class="row fixed">
            
            [[$blockTopLeft]]
            [[$blockTjenester]]
            
            </div><!-- end .row -->	
            
            <!-- ///////////////// -->
            
            <div class="hr"></div>
            
            <div class="row fixed">
            
            [[$blockEnova]] 
            	
            <div class="col-220">
            
            [[$blockNews]]
            
            </div><!-- end .col-220 -->
            
            <div class="col-460 last">
            
            [[$blockClients]]
            
            </div><!-- end .col-460 --> 
            
            </div><!-- end .row -->
            
            <!-- ///////////////// -->
            
            </div><!-- end #content -->
            
            [[$footerContent]]


            Don't know if this would help any?

            Im running mostly chunks to display content around the page, some TVs but they aren't presented on the index-page.

            Wayfinder menu is cached.

            My modx backend (manager) is also very slow, could this be related to each other?

            Server setup I really haven't gone in too, using servetheworld.net, and have never had any problems like this before...
            [ed. note: supertoON last edited this post 14 years, 9 months ago.]
              • 36112
              • 24 Posts
              Header chunk:

              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
              <!--[if lt IE 7 ]> <html class="ie6" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
              <!--[if IE 7 ]>    <html class="ie7" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
              <!--[if IE 8 ]>    <html class="ie8" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
              <!--[if IE 9 ]>    <html class="ie9" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
              <!--[if (gt IE 9)|!(IE)]><!--> <html xmlns="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
              <head>
              <base href="[[!++site_url]]" />
              
              <title>[[++site_name]] | [[*pagetitle]]</title>
              
              <meta name="description" content="[[*description]]" />
              <meta name="keywords"    content="[[*keywords]]" />
              <meta name="Language" content="norwegian">
              
              <meta property="og:title" content="[[++site_name]] | [[*pagetitle]]" />
              <meta property="og:description" content="Suppli AS leverer alle typer varmepumper, og har alle de største merkene og modellene på lager. Vi tilbyr selvfølgelig også montering, service, befaring og varmepumpehus." />
              <meta property="og:image" content="http://www.suppli.no/assets/components/diverse-bilder/supplismall.png" />
              <link href="assets/templates/suppli_main/favicon.ico" rel="shortcut icon" type="image/x-icon" />
              <link href="assets/templates/suppli_main/_layout/style.css" rel="stylesheet" type="text/css" media="all" />
              <link href="assets/templates/suppli_main/_layout/style-print.css" rel="stylesheet" type="text/css" media="print" />
              <link href="assets/templates/suppli_main/_layout/custom.css" rel="stylesheet" type="text/css" media="all" />
              <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js?ver=3.3.1'></script>
              <!--[if IE 6 ]>
              <script src="assets/templates/suppli_main/_layout/js/pngfix/DD_belatedPNG_0.0.8a-min.js" type="text/javascript"></script>
              <![endif]-->
              <script src="assets/templates/suppli_main/_layout/js/prettyphoto/jquery.prettyPhoto.js" type="text/javascript"></script>
              <link href="assets/templates/suppli_main/_layout/js/prettyphoto/css.prettyPhoto.css" rel="stylesheet" type="text/css" />
              <script src="assets/templates/suppli_main/_layout/js/validity/jquery.validity.js" type="text/javascript"></script>
              <link href="assets/templates/suppli_main/_layout/js/validity/css.validity.css" rel="stylesheet" type="text/css" />
              <script type='text/javascript' src='http://www.enevo.no/cms/wp-content/themes/g6feature/includes/jquery.cycle.all.min.js?ver=3.3.1'></script>
              <script src="assets/templates/suppli_main/_layout/js/scripts.js" type="text/javascript"></script>
              <script src="assets/components/js/plugins.js" type="text/javascript"></script>
              <script type="text/javascript" src="https://apis.google.com/js/plusone.js">
              {lang: 'no'}
              </script>
              <link rel="stylesheet" href="http://modx.com/assets/components/discuss/themes/modx/css/index.css" type="text/css" />
              <link rel="stylesheet" href="http://modx.com/assets/components/discuss/themes/modx/css/jquery-ui-1.8.16.custom.css" type="text/css" />
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/jquery-1.6.2.min.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/jquery.scrollTo-min.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/jquery-ui-1.8.16.custom.min.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/discuss.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/sh/shCore.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/sh/shAutoloader.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/sh/shDiscuss.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/dis.sticky.js"></script>
              <script type="text/javascript">// <![CDATA[
              DIS.url = "/";DIS.shJsUrl = "http://modx.com/assets/components/discuss/themes/modx/js/sh/";DIS.config.connector = "http://modx.com/assets/components/discuss/connector.php"
              // ]]></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/dis.post.modify.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/dis.post.buttons.js"></script>
              <link rel="stylesheet" href="http://modx.com/assets/components/discuss/themes/modx/css/index.css" type="text/css" />
              <link rel="stylesheet" href="http://modx.com/assets/components/discuss/themes/modx/css/jquery-ui-1.8.16.custom.css" type="text/css" />
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/jquery-1.6.2.min.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/jquery.scrollTo-min.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/jquery-ui-1.8.16.custom.min.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/discuss.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/sh/shCore.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/sh/shAutoloader.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/sh/shDiscuss.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/dis.sticky.js"></script>
              <script type="text/javascript">// <![CDATA[
              DIS.url = "/";DIS.shJsUrl = "http://modx.com/assets/components/discuss/themes/modx/js/sh/";DIS.config.connector = "http://modx.com/assets/components/discuss/connector.php"
              // ]]></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/dis.post.modify.js"></script>
              <script type="text/javascript" src="http://modx.com/assets/components/discuss/themes/modx/js/dis.post.buttons.js"></script>
              </head>
              
              <body>
              
              <div id="fb-root"></div>
              <script>(function(d, s, id) {
              var js, fjs = d.getElementsByTagName(s)[0];
              if (d.getElementById(id)) {return;}
              js = d.createElement(s); js.id = id;
              js.src = "//connect.facebook.net/nb_NO/all.js#xfbml=1";
              fjs.parentNode.insertBefore(js, fjs);
              }(document, 'script', 'facebook-jssdk'));</script>
              
              <noscript>
              <link href="assets/templates/suppli_main/_layout/style-nojs.css" rel="stylesheet" type="text/css" /> 
              <div class="nojs-warning"></div>
              </noscript>
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                You are aware that every one of those external scripts and .css files requires a separate browser request to the server, and then downloading of the file?

                It would be interesting to see what would happen if you put most of those at the bottom of the body rather than in the head.
                  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
                  • 36112
                  • 24 Posts
                  I see, how do I place the scripts at the bottom of the page? Just copy/paste everything below the footer? Do I need to place them inside a special tag?

                  I'll try this, but the original template is not this slow, and that one has everything inside the header?
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    http://betterexplained.com/articles/speed-up-your-javascript-load-time/
                    http://www.die.net/musings/page_load_time/

                    I also wondered if you have a lot of images that are processed by phpthumb. And that cufon error that one poster reported seeing could also be hanging your page load if it's trying to load cufon and can't.
                      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
                      • 3749
                      • 24,544 Posts
                      JavaScript can go anywhere in the page. FYI, though, JS is interpreted and not a particularly fast language, so if you can cut down on the amount of JS code necessary for the page it will speed things up.



                      ---------------------------------------------------------------------------------------------------------------
                      PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
                      MODx info for everyone: http://bobsguides.com/MODx.html
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting