We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42890
    • 4 Posts
    I have a site with only 48 stock items presented quite simply as a list, there are 5 specifications and a photograph. I have cached everything but the initial load time is still very slow. I think the problem is in my getResources call but I'm not sure.

    Here it is, am I doing this correctly? If you need more information please let me know. I'm not an expert and I wonder how sites with 1000's of products handle this....

    <h2>[[!getTag]]</h2>
    <div class='trsummary clearfix'>
      <div class='thsummary1'>STOCK NO</div>
      <div class='thsummary1'>MAKE</div>
      <div class='thsummary2'>MODEL</div>
      <div class='thsummary3'>YEAR</div>
      <div class='thsummary2'>PRICE</div>
      <div class='thsummary4'>PHOTO</div>
    </div>
    [[!getResourcesTag? 
    &elementClass=`modSnippet`
      &element=`getResources`
      &tpl=`stocklist`
      &parents=`4`
      &limit=`100`
      &includeContent=`1`
      &includeTVs=`1`
      &tvFilters=`Make!=''`
      &showHidden=`0`
      &hideContainers=`0`
      &cache=`1`
      &tagKey=`vtype`
    ]]
    



    Kind regards

    Phil
      • 42890
      • 4 Posts
      Oh, one more question, I've built the site as html5, is that a good idea?

      <!DOCTYPE HTML>
      <html>
      <head>
      <title>[[++site_name]] - [[*pagetitle]]</title>
      <base href="[[++site_url]]" />
      etc..
      
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        HTML 5 is just fine.
          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
          • 42890
          • 4 Posts
          Thankyou Susan, I thought so. I couldn't see how that would affect the processing or speed, just thought I'd ask. Kind regards.
          Quote from: sottwell at Feb 21, 2013, 10:23 PM
          HTML 5 is just fine.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            You might try caching your getResourcesTag snippet.
              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
              • 42890
              • 4 Posts
              Quote from: sottwell at Feb 21, 2013, 11:04 PM
              You might try caching your getResourcesTag snippet.

              I'm not quite sure what you mean by that, you mean cache the snippet itself? How would I do that? Thanks for the help. edit: I've found a property called dbCacheFlag which I can set to 1 on getResources, I've done that, to see if that helps... [ed. note: twolbdesign last edited this post 13 years, 7 months ago.]
                • 39519 ☆ A M B ☆
                • 79 Posts
                I'm curious if you have an SSL certificate (since you mentioned stock items). The RevoSSL plugin is a site killer when it comes to initial performance. If you have that installed, try disabling it.

                getResources has always been fairly fast for me, but make sure you are calling [[getResources]] and not [[!getResources]]. I think you should look elsewhere to see what might be slowing the page down.
                  Mat Dave Jones
                  • 10357
                  • 573 Posts
                  adding &depth=`1` makes a big difference