Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very long page load when multiple TaggerGetTags calls are on 1 page #106

Open
pmacswebteam opened this issue May 8, 2017 · 0 comments
Open

Comments

@pmacswebteam
Copy link

pmacswebteam commented May 8, 2017

We have a list of roughly 200 resources in a MODX collection. We are using getResources to display the sortable list of resources. The list is sortable based on 2 different tag groups. A sample of our code in the template chunk is below. As you will see, we need 3 TaggerGetTags calls in order for this to function properly, however, with this many snippet calls, we've noticed a significant increase in the page load time (about 1min). Is there a better way to optimize this?

<div class="grid mix[[TaggerGetTags? &resources=`[[+id]]` &rowTpl=`tag-class-tpl`]]">
  <!-- NAME -->
  <div class="unit three-quarters">
    <div class="unit one-quarter no-gutters">
  	[[+tv.url:ne=``:then=`<a href="[[+tv.url]]" target="_blank">[[+pagetitle]]</a>`:else=`[[+pagetitle]]`]]
	<br>
	<span class="fac-title">[[+longtitle]]</span>
    </div>
    <!-- DIVISION -->
    <div class="unit one-quarter no-gutters fac-divisions">[[TaggerGetTags? &groups=`2` &resources=`[[+id]]` &rowTpl=`tag-label-tpl` &separator=`, ` ]]</div>
    <!-- SPECIALTY -->
    <div class="unit half no-gutters fac-specialty">[[+tv.specialty:default=`N/A`]]</div>
  </div>
  <div class="unit one-quarter">
    <!-- LOCATION -->
    <div class="unit three-fifths no-gutters fac-location">[[TaggerGetTags:default=`N/A`? &groups=`1` &resources=`[[+id]]` &rowTpl=`tag-label-tpl` &separator=`, `]]</div>
    <!-- RESEARCH -->
    <div class="unit two-fifths fac-research">[[+tv.research:default=`N/A`]]</div>
  </div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant