Just been developing some pages within modX Revo, on average pages took around a second (1 - 1.3secs) to process & render (this included making calls to an external database and then looping through big recordsets whilst also making subsequent subquery calls on each iteration).
After including a simple getResources call (search by tag), the execution time extended to 1.8-2.1 secs, that is almost double to what I had before. Could someone offer any insight into why this is so and how i can remedy it?
All I am doing is using tagging to pull in specific content from a particular folder, so:
[[!getResourcesTag?
&element=`getResources`
&elementClass=`modSnippet`
&tpl=`travelguide_slide`
&hideContainers=`0`
&parents=`3085`
&limit=`2`
&includeContent=`1`
&tvFilters=`tags==%[[!current_destination]]%`
]]
&tpl=
<div style="padding:20px;">
<h2 class="title"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>
<p class="post-info">Posted by [[+createdby:userinfo=`fullname`]]
[[+tv.tags:notempty=` | <span class="tags">Tags:
[[!tolinks? &items=`[[+tv.tags]]` &key=`tag` &target=`1`]]
</span>`]]</p>
<div class="entry">
<p>[[+content]]... <a href="/[[~[[+id]]]]" class="readmore"> Read more </a></p>
<div class="clear"></div>
</div>
<p class="postmeta">
<span class="links">
| <a href="[[~[[+id]]]]#comments" class="comments">
Comments ([[!QuipCount? &thread=`[[!getParent? &parent=`[[*parent]]` &pagetitle=[[*pagetitle]] ]]-[[+id]]`]])
</a>
| <span class="date">[[+publishedon:strtotime:date=`%b %d, %Y`]]</span>
</span>
</p>
</div>
<br />
taking quip comments out of the equation halves the getresources call exec time by 50%:
&tpl=
<div style="padding:20px;">
<h2 class="title"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>
<p class="post-info">Posted by [[+createdby:userinfo=`fullname`]]
[[+tv.tags:notempty=` | <span class="tags">Tags:
[[!tolinks? &items=`[[+tv.tags]]` &key=`tag` &target=`1`]]
</span>`]]</p>
<div class="entry">
<p>[[+content]]... <a href="/[[~[[+id]]]]" class="readmore"> Read more </a></p>
<div class="clear"></div>
</div>
</div>
<br />