Forum

Thread tagged as: Problem, Runway

Pech runway site https://www.reisbijbel.nl extreem slow

Hi,

My site. https://www.reisbijbel.nl runs on perch Runway but it is very slow.

I test it with (https://tools.pingdom.com/#!/dffMeP/https://www.reisbijbel.nl) and the site is waiting for 5 sec before reviving any data.

Sometimes the load time is arround 20 sec. I hope some can help me, it is not the server because is it the only site that is running on it.

    Perch Runway: 3.0.13, PHP: 7.2.1, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $, with PDO
    Server OS: Linux, apache2handler
    Installed apps: content (3.0.13), assets (3.0.13), categories (3.0.13), perch_blog (5.6.1), perch_kraken (1.1), my_sample (2.1), perch_varnish (1.0), chirp_seo (1.1)
    App runtimes: <?php $apps_list = ['perch_blog','chirp_seo' ];
    PERCH_LOGINPATH: /perch
    PERCH_PATH: /home/reisbijb/domains/reisbijbel.nl/public_html/perch
    PERCH_CORE: /home/reisbijb/domains/reisbijbel.nl/public_html/perch/core
    PERCH_RESFILEPATH: /home/reisbijb/domains/reisbijbel.nl/public_html/perch/resources
    Image manipulation: GD
    PHP limits: Max upload 64M, Max POST 64M, Memory: 128M, Total max file upload: 64M
    F1: 3b606135b33e6a102526838f4152a807
    Resource folder writeable: Yes
    HTTP_HOST: www.reisbijbel.nl
    DOCUMENT_ROOT: /home/reisbijb/domains/reisbijbel.nl/public_html
    REQUEST_URI: /perch/core/settings/diagnostics/
    SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Fleur Besters

Fleur Besters 0 points

  • 3 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

What are you doing on the page that is running slowly? You are going to need to give us more information to help.

Thx Rachel,

I give some more information and hope you can help me. I really don't now why the page is so slow. I looks like i use a wrong way to get the info at the site.

Page template

<?php PerchSystem::force_ssl(); ?>
 <!doctype html>
<html lang="nl-NL">


<head>
    <?php perch_content('google_analytics.html'); ?>
    <meta name="robots" content="index, follow" />
    <meta name="charset" content="UTF-8" />
    <meta name='author' content='Reisbijbel'/>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'/>
    <meta name="google-site-verification" content="9L0TyE_fB3k036cBl8c-vTT6N0JyfcBrncOnKKHmYKU" />
    <meta name="country" content="<?php perch_page_attribute('pagePath'); ?>" />
        <?php perch_page_attributes(array(
            'template'=>'seo.html'
        ));
        ?>

        <?php perch_page_attributes(array(
            'template'=>'headlink.html'
        ));
        ?>
    <!-- CSSMap STYLESHEET - CONTINENTS -->
    <link rel="stylesheet" type="text/css" href="https://www.reisbijbel.nl/cssmap-continents/cssmap-continents.css" media="screen" />

    <title><?php perch_pages_title(); ?> Reizen en Vakantie - Reisinformatie - Reisbijbel</title>
</head>

<body class="<?php perch_page_attribute('bodyclass',array(
    'template'=>'body_attributes_land.html'
    ));
    ?>">
<!-- google tag -->     
    <?php perch_page_attributes(array(
        'template'=>'googletag.html'
        ));
    ?>      



    <div id="wrapper">
      <div id="navigation-menu">
          <div id="logo">
             <a class="reisbijbel-logo" href="/" title="Reisbijbel Real travel journalism"><img width="350" height="98" src="/static/images/logo.svg" alt="Reisbijbel Logo"/></a>
           </div>

            <div id="pagina-menu">
              <button id="button_home_intro" value="home_intro"><?php perch_pages_title(); ?></button>
              <button id="homeblock2link" value="homeblock2">Reportages </br> Boekrecensies </button>
              <button id="homeblock3link" value="homeblock3">Reisvideos </br> Reistips</button>
              <button id="homeblock4link" value="homeblock4">opmerkelijk </br> gadgets en apps</button>
              <!-- <button id="reizenlink" value="reisorganisaties">Reizen</button> -->
            </div>

            <div id="menu">

                <div id="overons">
                  <a class="about-us-link" href="/over-ons">Over ons</a>
                </div>

                <div id="social-sharing">
                    <a target="_blank" href="https://twitter.com/reisbijbel"><i class="fa fa-twitter-square"></i></a>
                    <a target="_blank" href="https://www.facebook.com/reisbijbel/"><i class="fa fa-facebook-square"></i></a>
                    <a target="_blank" href="https://www.instagram.com/reisbijbel/"><i class="fa fa-instagram"></i></a>
                    <a target="_blank" href="https://www.youtube.com/user/Reisbijbel"><i class="fa fa-youtube-square"></i></a>
                </div>


                <div id="bestemmingen">

                    <a href="#" class="bestemming-btn overlay-destinations-link">

                        <div class="icon">
                            <div class="em flaticon-bestemmingen"></div>
                        </div>

                        <div class="tekst">
                                Onze reisbestemmingen
                        </div>
                    </a>
                </div>
        </div>
    </div>

    <div class="block-container">

        <?php perch_content('heroimage.html'); ?>

        <div id="home_intro" class="introblock block-colour">     
            <div class="itemsslider">
                 <?php                   
                perch_blog_custom(array(
                'count'      => 11,
                'template'   => 'post_in_list_home_nieuw.html',
                'sort'       => 'postDateTime',
                'sort-order' => 'DESC',
                ));
                ?>
            </div>
            <div class="wereldkaart">
                <!-- CSSMap - Continents -->
                <div id="map-continents">
                    <ul class="continents">
                     <li class="c1"><a href="/afrika">Afrika</a></li>
                     <li class="c2"><a href="/azie">Azie</a></li>
                     <li class="c3"><a href="/oceanie">Oceanie</a></li>
                     <li class="c4"><a href="/europa">Europa</a></li>
                     <li class="c5"><a href="/noord-amerika">Noord Amerika</a></li>
                     <li class="c6"><a href="/zuid-amerika">Zuid Amerika</a></li>
                    </ul>
                </div>
                <!-- END OF THE CSSMap - Continents -->
            </div>
        </div>
        <div class="article-content-home">Test</div>
         <!-- parallax block 1  -->
        <div id="parallax1" class="bcg-parallax">
            <?php perch_content('parallax_quote.html'); ?>
        </div>      

        <div id="home_block2" class="home_block block-colour">    
            <div class="itemsslider">
                 <?php                   
                perch_blog_custom(array(
                'section'    => 'reportages',
                'count'      => 11,
                'template'   => 'post_in_list_home.html',
                'sort'       => 'postDateTime',
                'sort-order' => 'DESC',
                ));
                ?>
            </div>
            <div class="itemsslider">
                 <?php                   
                perch_blog_custom(array(
                'section'    => 'boekrecenties',
                'count'      => 11,
                'template'   => 'post_in_list_home.html',
                'sort'       => 'postDateTime',
                'sort-order' => 'DESC',
                ));
                ?>
            </div>              
        </div>
        <div class="article-content-home"></div>

        <!-- Quote 2 -->
        <div id="parallax2" class="bcg-parallax">
            <?php perch_content('parallax_quote2.html'); ?>
        </div>
        <!--  Einde Quote 2 -->
        <div id="home_block3" class="home_block block-colour">    
            <div class="itemsslider">
                 <?php                   
                perch_blog_custom(array(
                'section'    => 'reisvideos',
                'count'      => 11,
                'template'   => 'post_in_list_home.html',
                'sort'       => 'postDateTime',
                'sort-order' => 'DESC',
                ));
                ?>
            </div>
            <div class="itemsslider">
                 <?php                   
                perch_blog_custom(array(
                'section'    => 'reistips',
                'count'      => 11,
                'template'   => 'post_in_list_home.html',
                'sort'       => 'postDateTime',
                'sort-order' => 'DESC',
                ));
                ?>
            </div>              
        </div>
        <div class="article-content-home"></div>    
        <!-- Quote 3 -->
        <div id="parallax3" class="bcg-parallax">
            <?php perch_content('parallax_quote3.html'); ?>
        </div>
        <!--  Einde Quote 3 -->
        <div id="home_block4" class="home_block block-colour">    
            <div class="itemsslider">
                 <?php                   
                perch_blog_custom(array(
                'section'    => 'opmerkelijk',
                'count'      => 11,
                'template'   => 'post_in_list_home.html',
                'sort'       => 'postDateTime',
                'sort-order' => 'DESC',
                ));
                ?>
            </div>
            <div class="itemsslider">
                 <?php                   
                perch_blog_custom(array(
                'section'    => 'gadgets-en-reisapps',
                'count'      => 11,
                'template'   => 'post_in_list_home.html',
                'sort'       => 'postDateTime',
                'sort-order' => 'DESC',
                ));
                ?>
            </div>                  
        </div>
        <div class="article-content-home"></div>                        
    </div>

    <div id="menu_klein">
        <!-- Pushy Menu -->
        <nav class="pushy pushy-left">
            <div class="pushy-content">
                <ul>
                    <!-- Submenu -->
                    <li class="pushy-submenu">
                        <button>Bestemmingen</button>
                        <ul>
                            <li class="pushy-link"><a href="/afrika">Afrika</a></li>
                            <li class="pushy-link"><a href="/azie">Azie</a></li>
                            <li class="pushy-link"><a href="/caribisch-gebied">Caribisch Gebied</a></li>
                            <li class="pushy-link"><a href="/europa">Europa</a></li>
                            <li class="pushy-link"><a href="/midden-amerika">Midden Amerika</a></li>
                            <li class="pushy-link"><a href="/midden-oosten">Midden Oosten</a></li>
                            <li class="pushy-link"><a href="/noord-amerika">Noord Amerika</a></li>
                            <li class="pushy-link"><a href="/oceanie">Oceanië</a></li>
                            <li class="pushy-link"><a href="/zuid-amerika">Zuid Amerika</a></li>

                        </ul>
                    </li>
                    <li class="pushy-link" id="ham1">Reportages <br/> Boekrecensies</li>
                    <li class="pushy-link" id="ham2">Reisvideos <br />Reistips</li>
                    <li class="pushy-link" id="ham3">Opmerkelijk<br /> Gadgets & Reisapps</li>
                    <!-- <li class="pushy-link" id="ham4"><a href="/reizen">Reizen</a></li> -->
                    <li class="pushy-link"><a href="/over-ons">Over ons</a></li>
                </ul>
            </div>
        </nav>

        <!-- Site Overlay -->
        <div class="site-overlay"></div>

        <!-- Your Content -->
        <div id="container">
            <!-- Menu Button -->
            <button class="menu-btn">☰</button>
        </div>      
    </div>
</div>

        <?php perch_page_attributes(array(
            'template'=>'scripts.html'
        ));
        ?>

        <script type="text/javascript" src="/static/js/controls/home.js"></script>
        <!-- CSSMap SCRIPT -->
        <script type="text/javascript" src="https://cssmapsplugin.com/5/jquery.cssmap.min.js"></script>

        <script type="text/javascript">
            $(document).ready(function(){
            // CSSMap;
            $("#map-continents").CSSMap({
            "size": 1450
            });
            // END OF THE CSSMap;
            });
        </script>

        <script type="text/javascript" src="static/js/controls/animaties_home.js"></script>

</body>
</html>

Javascript form the page


function getPath() { var pathString = location.href.split('#')[1]; return pathString ? pathString.split('/').filter(function(str) { return str; }): []; } var blockLookup = { "boekrecenties" : "home_block2", "reportages" : "home_block2", "reisvideos" : "home_block3", "reistips" : "home_block3", "opmerkelijk" : "home_block4", "gadgets-en-reisapps" : "home_block4" }; function getSelector(hash) { var r = hash[1]; var b = blockLookup[r]; console.log(hash + " ----- " + b); return '#' + b; } var navmenu = document.getElementById("navigation-menu"), Block1 = document.getElementById("block1"), HomeIntro = document.getElementById("home_intro"), Wereldkaart = document.getElementsByClassName("wereldkaart"), wrapper = document.getElementById("wrapper"), // Main projects timeline tlpagina = new TimelineMax(); tlpagina .set(wrapper, {autoAlpha: 1}); // opbouw pagina tl = new TimelineMax(); tl .from(navmenu, 0.5, {y: -150, autoAlpha: 0, ease:Power1.easeOut, delay: 0.20}) .from(block1, 0.5, {y: -150, autoAlpha: 0, ease:Power1.easeOut, delay: -0.15}) .from(HomeIntro, 0.5, {y: -50, autoAlpha: 0, ease:Power1.easeOut, delay: -0.10}); // init controller var controller = new ScrollMagic.Controller({globalSceneOptions: {triggerHook: "onEnter", duration: "135%"}}); //LandtipScene var landtipsScene = new ScrollMagic.Scene({ }); //parallax 1 scene var parallaxTL = new TimelineMax(); parallaxTL .from('.parallax-quote', 0.4, {autoAlpha: 0, ease:Power0.easeNone}, 0.4) .from('.parallaxbackground', 2, {y: "50%", ease: Linear.easeNone}, 0); var slideParallaxScene = new ScrollMagic.Scene({ triggerElement: '#parallax1', triggerHook: 1, duration: '100%' }) .setTween(parallaxTL) .addTo(controller); //parallax 2 scene var parallaxTL2 = new TimelineMax(); parallaxTL2 .from('.parallax-quote2', 0.4, {autoAlpha: 0, ease:Power0.easeNone}, 0.4) .from('.parallaxbackground2', 2, {y: "50%", ease: Linear.easeNone}, 0); var slideParallaxScene2 = new ScrollMagic.Scene({ triggerElement: '#parallax2', triggerHook: 1, duration: '100%' }) .setTween(parallaxTL2) .addTo(controller); //parallax 3 scene var parallaxTL3 = new TimelineMax(); parallaxTL3 .from('.parallax-quote3', 0.4, {autoAlpha: 0, ease:Power0.easeNone}, 0.4) .from('.parallaxbackground3', 2, {y: "50%", ease: Linear.easeNone}, 0); var slideParallaxScene3 = new ScrollMagic.Scene({ triggerElement: '#parallax3', triggerHook: 1, duration: '100%' }) .setTween(parallaxTL3) .addTo(controller); // Scroll to var ButtonHomeIntro = document.getElementById("button_home_intro"), HomeBlock2Link = document.getElementById("homeblock2link"), HomeBlock3Link = document.getElementById("homeblock3link"), HomeBlock4Link = document.getElementById("homeblock4link"); reizenlink = document.getElementById("reizenlink"); HamBlock1Link = document.getElementById("ham1"); HamBlock2Link = document.getElementById("ham2"); HamBlock3Link = document.getElementById("ham3"); HamBlock4Link = document.getElementById("ham4"); function scrollToSelector(selector) { console.log('scrolling to ' + selector); if (selector) { TweenMax.to(window, 1, {scrollTo:{y:selector, offsetY:120}}); } } // Home Intro ButtonHomeIntro.onclick = function() { scrollToSelector("#home_intro"); }; // Reportages Boekrecensies Block HomeBlock2Link.onclick = function() { scrollToSelector("#home_block2"); }; HamBlock1Link.onclick = function() { scrollToSelector("#home_block2"); }; // Reisvideos Reistips HomeBlock3Link.onclick = function() { scrollToSelector("#home_block3"); }; HamBlock2Link.onclick = function() { scrollToSelector("#home_block3"); }; // landitems HomeBlock4Link.onclick = function() { scrollToSelector("#home_block4"); }; HamBlock3Link.onclick = function() { scrollToSelector("#home_block4"); }; var articleTL = new TimelineMax(); var terugTL = new TimelineMax(); function terugKlappen() { terugTL .set($('.home_block'), {className: '-=hidden'}) $('.home_block').removeClass('hidden'); $('.article-content-home').html(''); } $(document).ready(function() { function switchArticle(selector, url) { $.get("/artikelen/" + url, function(data) { var html = $($.parseHTML(data), '.item-container'); $(selector + ' + .article-content-home').html(html); articleTL .set($(selector), {className: '+=hidden'}) .to(window, 1, {scrollTo:{y:".item-container", offsetY:120}}); $('.back-to-articles').attr('href', '/' /* + url.split('/')[0]); */ ).click(function() { window.history.pushState({}, "", "/"); processUrl(); return false; }); // terugKlappen(); // }); }); return false; } $('a.home-title, a.hoofd_item_title').each(function() { var href = $(this).attr('href'); $(this).click(function() { window.history.pushState({}, "", "/" + href); processUrl(); return false; }); // $(this).attr('href', '#' + href); }); function processUrl() { terugKlappen(); var url = window.location.pathname; var path = url.split('/'); if (path[1]) { switchArticle(getSelector(path), path[1] + "/" + path[2]); } } processUrl(); // function hashchanged() { // var path = getPath(); // scrollToSelector(getSelector(path)); // terugKlappen(); // if (path[1]) { // switchArticle(getSelector(path), path[0] + "/" + path[1]); // } // } // $(function(){ // // Bind the event. // $(window).on('hashchange', hashchanged); // hashchanged(); // }); }); /*! Pushy - v1.1.0 - 2017-1-30 * Pushy is a responsive off-canvas navigation menu using CSS transforms & transitions. * https://github.com/christophery/pushy/ * by Christopher Yee */ (function ($) { var pushy = $('.pushy'), //menu css class body = $('body'), container = $('#container'), //container css class push = $('.push'), //css class to add pushy capability pushyLeft = 'pushy-left', //css class for left menu position pushyOpenLeft = 'pushy-open-left', //css class when menu is open (left position) pushyOpenRight = 'pushy-open-right', //css class when menu is open (right position) siteOverlay = $('.site-overlay'), //site overlay menuBtn = $('.menu-btn, .pushy-link'), //css classes to toggle the menu menuBtnFocus = $('.menu-btn'), //css class to focus when menu is closed w/ esc key menuLinkFocus = $(pushy.data('focus')), //focus on link when menu is open menuSpeed = 200, //jQuery fallback menu speed menuWidth = pushy.width() + 'px', //jQuery fallback menu width submenuClass = '.pushy-submenu', submenuOpenClass = 'pushy-submenu-open', submenuClosedClass = 'pushy-submenu-closed', submenu = $(submenuClass); //close menu w/ esc key $(document).keyup(function(e) { //check if esc key is pressed if (e.keyCode == 27) { //check if menu is open if( body.hasClass(pushyOpenLeft) || body.hasClass(pushyOpenRight) ){ if(cssTransforms3d){ closePushy(); //close pushy }else{ closePushyFallback(); opened = false; //set menu state } //focus on menu button after menu is closed if(menuBtnFocus){ menuBtnFocus.focus(); } } } }); function togglePushy(){ //add class to body based on menu position if( pushy.hasClass(pushyLeft) ){ body.toggleClass(pushyOpenLeft); }else{ body.toggleClass(pushyOpenRight); } //focus on link in menu after css transition ends if(menuLinkFocus){ pushy.one('transitionend', function() { menuLinkFocus.focus(); }); } } function closePushy(){ if( pushy.hasClass(pushyLeft) ){ body.removeClass(pushyOpenLeft); }else{ body.removeClass(pushyOpenRight); } } function openPushyFallback(){ //animate menu position based on CSS class if( pushy.hasClass(pushyLeft) ){ body.addClass(pushyOpenLeft); pushy.animate({left: "0px"}, menuSpeed); container.animate({left: menuWidth}, menuSpeed); //css class to add pushy capability push.animate({left: menuWidth}, menuSpeed); }else{ body.addClass(pushyOpenRight); pushy.animate({right: '0px'}, menuSpeed); container.animate({right: menuWidth}, menuSpeed); push.animate({right: menuWidth}, menuSpeed); } //focus on link in menu if(menuLinkFocus){ menuLinkFocus.focus(); } } function closePushyFallback(){ //animate menu position based on CSS class if( pushy.hasClass(pushyLeft) ){ body.removeClass(pushyOpenLeft); pushy.animate({left: "-" + menuWidth}, menuSpeed); container.animate({left: "0px"}, menuSpeed); //css class to add pushy capability push.animate({left: "0px"}, menuSpeed); }else{ body.removeClass(pushyOpenRight); pushy.animate({right: "-" + menuWidth}, menuSpeed); container.animate({right: "0px"}, menuSpeed); push.animate({right: "0px"}, menuSpeed); } } function toggleSubmenu(){ //hide submenu by default $(submenuClass).addClass(submenuClosedClass); $(submenuClass).on('click', function(){ var selected = $(this); if( selected.hasClass(submenuClosedClass) ) { //hide opened submenus $(submenuClass).addClass(submenuClosedClass).removeClass(submenuOpenClass); //show submenu selected.removeClass(submenuClosedClass).addClass(submenuOpenClass); }else{ //hide submenu selected.addClass(submenuClosedClass).removeClass(submenuOpenClass); } }); } //checks if 3d transforms are supported removing the modernizr dependency var cssTransforms3d = (function csstransforms3d(){ var el = document.createElement('p'), supported = false, transforms = { 'webkitTransform':'-webkit-transform', 'OTransform':'-o-transform', 'msTransform':'-ms-transform', 'MozTransform':'-moz-transform', 'transform':'transform' }; if(document.body !== null) { // Add it to the body to get the computed style document.body.insertBefore(el, null); for(var t in transforms){ if( el.style[t] !== undefined ){ el.style[t] = 'translate3d(1px,1px,1px)'; supported = window.getComputedStyle(el).getPropertyValue(transforms[t]); } } document.body.removeChild(el); return (supported !== undefined && supported.length > 0 && supported !== "none"); }else{ return false; } })(); if(cssTransforms3d){ //toggle submenu toggleSubmenu(); //toggle menu menuBtn.on('click', function(){ togglePushy(); }); //close menu when clicking site overlay siteOverlay.on('click', function(){ togglePushy(); }); }else{ //add css class to body body.addClass('no-csstransforms3d'); //hide menu by default if( pushy.hasClass(pushyLeft) ){ pushy.css({left: "-" + menuWidth}); }else{ pushy.css({right: "-" + menuWidth}); } //fixes IE scrollbar issue container.css({"overflow-x": "hidden"}); //keep track of menu state (open/close) var opened = false; //toggle submenu toggleSubmenu(); //toggle menu menuBtn.on('click', function(){ if (opened) { closePushyFallback(); opened = false; } else { openPushyFallback(); opened = true; } }); //close menu when clicking site overlay siteOverlay.on('click', function(){ if (opened) { closePushyFallback(); opened = false; } else { openPushyFallback(); opened = true; } }); } }(jQuery));

Debug info from page https://www.reisbijbel.nl/reisvideos/toegangspoort-tot-de-ganges

Debug Message - Perch Runway 3.0.13
[4277] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate, pr.routeOrder, s.settingValue AS siteOffline FROM perch3_pages p LEFT JOIN perch3_page_routes pr ON p.pageID=pr.pageID LEFT JOIN perch3_settings s ON s.settingID='siteOffline' UNION SELECT NULL AS pagePath, pr2.routePattern, pr2.routeRegExp, pr2.templatePath AS pageTemplate, pr2.routeOrder, NULL AS siteOffline FROM perch3_page_routes pr2 WHERE templateID!=0 ORDER BY routeOrder ASC, pagePath ASC
Matched route: reisvideos/[slug:s]
Using master page: /templates/pages/home.php
Page arguments:

Array
(
    [0] => /reisvideos/toegangspoort-tot-de-ganges
    [s] => toegangspoort-tot-de-ganges
    [1] => toegangspoort-tot-de-ganges
)

[43] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0
[6] SELECT regionKey, regionHTML FROM perch3_content_regions WHERE regionPage='/' OR regionPage='*' ORDER BY regionPage DESC
[1] SELECT * FROM perch3_pages WHERE pagePath='/' LIMIT 1
Using template: /templates/pages/attributes/default.html
Using sub-template: /templates/pages/attributes/seo.html
Using sub-template: /templates/pages/attributes/body_attributes_land.html
Using template: /templates/pages/attributes/seo.html
Using template: /templates/pages/attributes/headlink.html
Using template: /templates/pages/attributes/body_attributes_land.html
Using template: /templates/pages/attributes/googletag.html
[11] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2018-01-20 08:02:00' ) GROUP BY itemID, sortval ORDER BY sortval DESC LIMIT 0, 11
[1] SELECT FOUND_ROWS() AS `count`
[11] Using template: /templates/blog/post_in_list_home_nieuw.html
[8] SELECT * FROM perch3_blog_sections ORDER BY sectionTitle ASC
[1] SELECT * FROM perch3_blogs ORDER BY blogTitle ASC
[1] SELECT * FROM perch3_blog_sections WHERE sectionSlug='reportages' LIMIT 1
[11] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE ( sectionID='5' AND postStatus='Published' AND postDateTime<='2018-01-20 08:02:00' ) GROUP BY itemID, sortval ORDER BY sortval DESC LIMIT 0, 11
[1] SELECT FOUND_ROWS() AS `count`
[11] Using template: /templates/blog/post_in_list_home.html
[1] SELECT * FROM perch3_blog_sections WHERE sectionSlug='boekrecenties' LIMIT 1
[11] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE ( sectionID='4' AND postStatus='Published' AND postDateTime<='2018-01-20 08:02:00' ) GROUP BY itemID, sortval ORDER BY sortval DESC LIMIT 0, 11
[1] SELECT FOUND_ROWS() AS `count`
[11] Using template: /templates/blog/post_in_list_home.html
[1] SELECT * FROM perch3_blog_sections WHERE sectionSlug='reisvideos' LIMIT 1
[11] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE ( sectionID='3' AND postStatus='Published' AND postDateTime<='2018-01-20 08:02:00' ) GROUP BY itemID, sortval ORDER BY sortval DESC LIMIT 0, 11
[1] SELECT FOUND_ROWS() AS `count`
[11] Using template: /templates/blog/post_in_list_home.html
[1] SELECT * FROM perch3_blog_sections WHERE sectionSlug='reistips' LIMIT 1
[11] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE ( sectionID='2' AND postStatus='Published' AND postDateTime<='2018-01-20 08:02:00' ) GROUP BY itemID, sortval ORDER BY sortval DESC LIMIT 0, 11
[1] SELECT FOUND_ROWS() AS `count`
[11] Using template: /templates/blog/post_in_list_home.html
[1] SELECT * FROM perch3_blog_sections WHERE sectionSlug='opmerkelijk' LIMIT 1
[11] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE ( sectionID='8' AND postStatus='Published' AND postDateTime<='2018-01-20 08:02:00' ) GROUP BY itemID, sortval ORDER BY sortval DESC LIMIT 0, 11
[1] SELECT FOUND_ROWS() AS `count`
[11] Using template: /templates/blog/post_in_list_home.html
[1] SELECT * FROM perch3_blog_sections WHERE sectionSlug='gadgets-en-reisapps' LIMIT 1
[11] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE ( sectionID='7' AND postStatus='Published' AND postDateTime<='2018-01-20 08:02:00' ) GROUP BY itemID, sortval ORDER BY sortval DESC LIMIT 0, 11
[1] SELECT FOUND_ROWS() AS `count`
[11] Using template: /templates/blog/post_in_list_home.html
Using template: /templates/pages/attributes/scripts.html
Request time: 4.8314
Process time: 4.8291
Memory: 7.4179

And

Debug Message - Perch Runway 3.0.13
[4277] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate, pr.routeOrder, s.settingValue AS siteOffline FROM perch3_pages p LEFT JOIN perch3_page_routes pr ON p.pageID=pr.pageID LEFT JOIN perch3_settings s ON s.settingID='siteOffline' UNION SELECT NULL AS pagePath, pr2.routePattern, pr2.routeRegExp, pr2.templatePath AS pageTemplate, pr2.routeOrder, NULL AS siteOffline FROM perch3_page_routes pr2 WHERE templateID!=0 ORDER BY routeOrder ASC, pagePath ASC
Matched route: artikelen/reisvideos/[slug:s]
Using master page: /templates/pages/blog/post.php
Page arguments:

Array
(
    [0] => /artikelen/reisvideos/toegangspoort-tot-de-ganges
    [s] => toegangspoort-tot-de-ganges
    [1] => toegangspoort-tot-de-ganges
)

[43] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='toegangspoort-tot-de-ganges')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2018-01-20 08:03:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 10
[1] SELECT FOUND_ROWS() AS `count`
[1] Using template: /templates/blog/meta_head.html
[4] SELECT * FROM perch3_blog_authors ORDER BY authorFamilyName, authorGivenName ASC
[1] SELECT * FROM perch3_blogs ORDER BY blogTitle ASC
[8] SELECT * FROM perch3_blog_sections ORDER BY sectionTitle ASC
[43] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0
[1] SELECT * FROM perch3_blog_posts WHERE postStatus='Published' AND postDateTime<='2018-01-20 08:03:00' AND postSlug='toegangspoort-tot-de-ganges'
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='toegangspoort-tot-de-ganges')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2018-01-20 08:03:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 10
[1] SELECT FOUND_ROWS() AS `count`
[1] Using template: /templates/blog/post.html
Request time: 0.1497
Process time: 0.1481
Memory: 7.4179
Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Hello Fleur,

it is not the server because is it the only site that is running on it.

This doesn't necessarily mean the server is performing well.

  • Are you getting a slow load time in a local environment too?
  • Is there any difference in the setup of your local and production environments?
  • What steps have you done to conclude Perch is the cause of the slow load time?
  • Have you discussed the issue with your host?

In the past, I had a slow load time on a certain page and after discussing the issue with the host, the cause turned out to be the MySQL settings on the server. So it might be a good idea to speak to your host about this.


By the way, analysing the website on Google's PageSpeed Insights suggests you still have a lot of optimisation you can do (currently scoring 14/100 for desktop).

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you set define('PERCH_PRODUCTION_MODE', PERCH_DEVELOPMENT); in your config.php file, you should get timing output in the page debug. That will help you see where things are slow. It could be that there's a particular table that needs repairing, or something like that.

Having 4277 pages and routes initially looks a bit alarming, but that's the same for the fast request too, so it's not likely to be a problem.

Provided you've not turned off progressive flushing in your config file, the output should start right after the analytics region at the start of your <head>, so TTFB should be very quick. The page should start being sent to the browser even if things further down are slow. I'm seeing multiple second TTFBs on your site, so that doesn't add up.

So the other thing is you're using Varnish (according to the headers) which should mask any slowness, but you're getting cache misses on pages that should be cached. Have you checked your Varnish config to make sure you're explicitly excluding the Google Analytics cookies from the request?

If you can get Varnish working correctly it will initially mask the slowness, buying you time to find and fix the cause. The site shouldn't be this slow.

Thx Drew and Hussein,

I change the mysql settings and the site is now faster. Thx Hussein for the tip

@Drew a set define('PERCH_PRODUCTION_MODE', PERCH_DEVELOPMENT); in config.php and this is the output. To time mark red and slow. see https://joepkolijn.nl/marokko and https://joepkolijn.nl

It is the perch3_blog_index the tabel is big.
87.526 InnoDB utf8_general_ci 153,4 MiB

and growing. Is there something i can do?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you tried repairing that table? 87k rows isn't big.

Drew McLellan said:

Have you tried repairing that table? 87k rows isn't big.

Yes i repair the table. I wondering is 153,4 MB for the table not big?

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, I have a table here of 2.8GB.

Oke, good to now what is normal.

This is de code what's delay the site. Is there a better way to get the info?

<?php                   
                perch_blog_custom(array(
                'section'    => 'reistips',
                'count'      => 11,
                'template'   => 'post_in_list_home.html',
                'sort'       => 'postDateTime',
                'sort-order' => 'DESC',
                ));
                ?>

Thx

Rachel Andrew

Rachel Andrew 394 points
Perch Support

There is no reason that should be causing things to be slow, all indications are that your server is causing the issue here.

Rachel Andrew said:

There is no reason that should be causing things to be slow, all indications are that your server is causing the issue here.

That is good to now. Thx for the support. I looking in to my server.