Answers.Body: <p>Kind of a broad topic, but here are some resources to get your started:</p>
  
  <ul>
  <li>Great article on Craft optimizations here: <a href="http://www.patpohler.com/performance-optimization-craft-cms/" rel="nofollow">http://www.patpohler.com/performance-optimization-craft-cms/</a></li>
  <li>Make sure your environment isn't a bottleneck.
  
  <ul>
  <li>You're not on an overloaded shared hosting server.</li>
  <li>PHP has plenty of memory allocated to it.</li>
  <li>Your server has plenty of resources (memory, CPU, disk space).</li>
  <li>Run PHP 7.</li>
  </ul></li>
  <li>Eager load elements as necessary: <a href="https://craftcms.com/docs/templating/eager-loading-elements" rel="nofollow">https://craftcms.com/docs/templating/eager-loading-elements</a></li>
  <li>Judiciously use template caching in Craft where necessary: <a href="https://craftcms.com/docs/templating/cache" rel="nofollow">https://craftcms.com/docs/templating/cache</a></li>
  <li>Enable devMode and review the profile output in the browser's console (as well as <code>craft/storage/runtime/logs</code> files to spot any bottlenecks (# of queries, types of queries, plugins involved, etc.)</li>
  <li>Use <a href="https://craftcms.com/classreference/services/TemplatesService#hook-detail" rel="nofollow">template hooks</a> as necessary.</li>
  <li>Go through the plethora of client side things that can slow a page down. <a href="https://developers.google.com/speed/pagespeed/insights/" rel="nofollow">Google Pagespeed Insights</a> is a good place to start for that.</li>
  <li>If none of these work, you can looking into changing your content architecture so that 100+ Matrix blocks on one page aren't necessary.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-26T19:14:34.757Z
Answers.LastActivityDate: 2016-08-26T19:14:34.757Z
Answers.UserDisplayName: Brad Bell
Body: <p>We've got a site with a navigation on top, which navigates to anchorpoints on the page, but the whole page is built with 1 matrix. The page will probably be very long and will have all kinds of images (small &amp; big) in it. I've set image transforms, so images won't be a problem.
  BUT: is it possible to speed up the site with lazyloading or something like that when there's 100+ matrix elements in it? 
  And on that note I guess the biggest problem we'll face is having the anchor points still working: if they click the anchorpoint they should be able to scroll to that point, even if it's not visible yet.</p>
  
  <p>Is this possible?</p>
  
Tags: <matrix><speed>
Title: Speeding up the pageload of a page with a huge Matrix
ThreadText: # Speeding up the pageload of a page with a huge Matrix
  
  (Asked by: username_0 on 2016-08-26)
  
  We've got a site with a navigation on top, which navigates to anchorpoints on the page, but the whole page is built with 1 matrix. The page will probably be very long and will have all kinds of images (small & big) in it. I've set image transforms, so images won't be a problem.
  BUT: is it possible to speed up the site with lazyloading or something like that when there's 100+ matrix elements in it?
  And on that note I guess the biggest problem we'll face is having the anchor points still working: if they click the anchorpoint they should be able to scroll to that point, even if it's not visible yet.
  
  Is this possible?
  
  **Tags:** matrix, speed
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-08-26. Score: 3 | Accepted answer
  
  Kind of a broad topic, but here are some resources to get your started:
  
  * Great article on Craft optimizations here: <http://www.patpohler.com/performance-optimization-craft-cms/>
  * Make sure your environment isn't a bottleneck.
    + You're not on an overloaded shared hosting server.
    + PHP has plenty of memory allocated to it.
    + Your server has plenty of resources (memory, CPU, disk space).
    + Run PHP 7.
  * Eager load elements as necessary: <https://craftcms.com/docs/templating/eager-loading-elements>
  * Judiciously use template caching in Craft where necessary: <https://craftcms.com/docs/templating/cache>
  * Enable devMode and review the profile output in the browser's console (as well as `craft/storage/runtime/logs` files to spot any bottlenecks (# of queries, types of queries, plugins involved, etc.)
  * Use [template hooks](https://craftcms.com/classreference/services/TemplatesService#hook-detail) as necessary.
  * Go through the plethora of client side things that can slow a page down. [Google Pagespeed Insights](https://developers.google.com/speed/pagespeed/insights/) is a good place to start for that.
  * If none of these work, you can looking into changing your content architecture so that 100+ Matrix blocks on one page aren't necessary.
  
  
  ---
  
  