Answers.Body: <p>Add the following tags around your <code>{% pagination %}</code></p>
  
  <pre><code>{% cache %}
  {% endcache %}
  </code></pre>
  
  <p>Those tags will refresh every time the content changes, and when the content hasn't changed, it'll reduce your database queries significantly.</p>
  
  <p>For more info see:</p>
  
  <ul>
  <li><a href="http://buildwithcraft.com/docs/templating/cache" rel="nofollow noreferrer">The craft docs</a></li>
  <li><a href="https://craftcms.stackexchange.com/questions/105/what-are-the-best-practices-for-using-the-cache-tag">What are the best practices for using the cache tag</a></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-21T13:57:02.447Z
Answers.LastActivityDate: 2015-04-21T13:57:02.447Z
Answers.LastEditDate: 2017-04-13T12:50:59.930Z
Answers.UserDisplayName: darylknight
Body: <p>I was wondering if anyone else has experienced a serious performance hit when implementing pagination?</p>
  
  <p>By just using Safari's timeline, I can see my page takes 500ms to generate.  After introducing JUST the paginate tag (not including any loops etc), it now takes 1.5s!  </p>
  
  <p>Is this normal behaviour?  If not, what should I be doing to improve the performance?</p>
  
  <p>Thanks</p>
  
  <p>EDIT:  Thanks for the suggestions regarding caching.  I am aware of the cache tag however, the paginated entries are the results of a search query with various filters so I'm concerned that the caching will have little effect.  Or am I wrong?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-21T13:07:48.487Z
Comments.Text: Have you tried implementing the {% cache %}{% endcache %} tags?
Comments.UserDisplayName: darylknight
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-21T13:25:02.537Z
Comments.Text: I'll second @DarylKnight's comment - depending on what you are paginating, you might be making some pretty hefty database queries. {% cache %} tags will help!
Comments.UserDisplayName: Aaron Berkowitz
Tags: <performance><pagination>
Title: Paginate performance issue
ThreadText: # Paginate performance issue
  
  (Asked by: username_0 on 2015-04-21)
  
  I was wondering if anyone else has experienced a serious performance hit when implementing pagination?
  
  By just using Safari's timeline, I can see my page takes 500ms to generate. After introducing JUST the paginate tag (not including any loops etc), it now takes 1.5s!
  
  Is this normal behaviour? If not, what should I be doing to improve the performance?
  
  Thanks
  
  EDIT: Thanks for the suggestions regarding caching. I am aware of the cache tag however, the paginated entries are the results of a search query with various filters so I'm concerned that the caching will have little effect. Or am I wrong?
  
  **Tags:** performance, pagination
  
  > **Comments:**
  > **username_1**: Have you tried implementing the {% cache %}{% endcache %} tags?  
  > **username_2**: I'll second @DarylKnight's comment - depending on what you are paginating, you might be making some pretty hefty database queries. {% cache %} tags will help!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-04-21. Score: 1
  
  Add the following tags around your `{% pagination %}`
  
  ```
  {% cache %}
  {% endcache %}
  
  ```
  
  Those tags will refresh every time the content changes, and when the content hasn't changed, it'll reduce your database queries significantly.
  
  For more info see:
  
  * [The craft docs](http://buildwithcraft.com/docs/templating/cache)
  * [What are the best practices for using the cache tag](https://craftcms.stackexchange.com/questions/105/what-are-the-best-practices-for-using-the-cache-tag)
  
  
  ---
  
  