Skip to main content

Questions tagged [performance]

Filter by
Sorted by
Tagged with
42 votes
2 answers
5k views

What are the best practices for using the {% cache %} tag?

I started using the {% cache %} tag and would like to know what the best practices are: . Regarding performance: For example does it make sense.. ..to cache the whole template, or is it better to ...
Victor's user avatar
  • 8,396
9 votes
1 answer
2k views

Load balancing nodes configuration (3 Craft nodes behind F5 Big-IP)

Craft deployed and working well on one node. Now looking into load balancing 3 nodes behind a LTM device (F5 Big-IP). The server environment is the following: a GlusterFS replicated "shared" file-...
Mathieu P.'s user avatar
3 votes
1 answer
2k views

Long 'Deleting stale template caches'

Is it common to have a (near)constantly running 'Deleting stale template caches' task ongoing? I commonly log in to see a task still pending several hours after the last change to the site was made, ...
Darren's user avatar
  • 433
8 votes
1 answer
918 views

Using “search” vs. “relatedTo” in a template

I have problems to understand the difference between search and relatedTo. From my understanding, this is a fulltext search on all fields. {% set entries = craft.entries.search(test).order('score') %}...
MISC's user avatar
  • 1,019
27 votes
2 answers
4k views

What are the most common template performance gotchas to avoid?

I'm coming to Craft as someone experienced with Expression Engine templates. When I'm coding for EE I try to avoid certain big ticket performance hits, for example: Using embeds excessively. Using ...
mjr's user avatar
  • 1,405
6 votes
1 answer
520 views

What effect does nesting cache tags have?

What effect, if any, does nesting cache tags have? It seems like it would be redundant, but are there any inherent drawbacks? Recently, I can across an instance where I was using the {% cache %} tag ...
Alex Roper's user avatar
  • 2,642
3 votes
1 answer
788 views

Poor performance on midsized site / Queries without index?

I'm running a mid sized website (couple hundred articles, between 30-50k visits per day) on a Digital Ocean 16GB / 8 Cores web server and I have two questions: Most of the time the website runs ...
Ivan's user avatar
  • 31
2 votes
2 answers
553 views

Server respond is very long (25s). Is there a way to optimize the perfomance?

Normally I'm not working that much with craft and twig syntax, so first of all sorry if I'm not that much into that topic (normaly html,css,js,jquery). There is one site which need so much time to ...
vision's user avatar
  • 21
2 votes
1 answer
516 views

Linking to specific entries in Twig: How performant is Reference Tags parsing?

I have a small menu of fixed entries that forms a sub-nav on a site. I'm currently using Reference Tag parsing to grab links to these entries: <li><a href="{{ '{entry:3666:url}' | parseRefs ...
Michael Rog's user avatar
  • 3,420
1 vote
1 answer
260 views

Changes to twig template take over 20s to propagate

If I make changes to one of my twig templates, it takes over twenty seconds for Craft to reflect the updates on the local site. I'm running Craft locally in DDEV. I tried the debug toolbar but am ...
darkbasic's user avatar
9 votes
3 answers
3k views

Creating partials outside of the templates folder

I'm interested in building a highly modular Craft site in which my folder structure might look something like this: - craft/ - modules/ - hero-banner/ index.html scripts.js styles....
Aaron Bushnell's user avatar
9 votes
1 answer
1k views

Is there a way to override the template caching system?

We're in the process of building a restfull backend in craft. We had sluggish response times due to the amount of queries done by craft on a an entry listing. Each entry had about 3 levels of nesting ...
pythic's user avatar
  • 569
2 votes
1 answer
299 views

Performance issues from matrix vs rich text?

I'm finding myself using matrices a good deal on my site for a specific client. My client has little experience with any content management systems, and I liked the structure matrices could provide. ...
Nick's user avatar
  • 217
2 votes
2 answers
1k views

Understanding Eager Loading

I am trying to get to grips with Eager Loading. I have the following code: {% for article in entry.relatedArticles %} <div class="c-card // l-card--third"> <a href="{{ article.url }}">...
Terry Upton's user avatar
  • 1,894
1 vote
2 answers
275 views

Category query very slow on multilingual site

I have a directory of sea ports with a google map that loads about 450 records. The map and listings and pagination work fine. On their own, I get a 2.5 sec page load average. However as soon as I ...
joomkit's user avatar
  • 2,048
1 vote
1 answer
706 views

Use cache instead of saving to database

With my plugin I am generating and saving a lot of data to a secondary table. Data that can be generated on the fly that is associated with entries. I have noticed a performance hit and was given a ...
a-am's user avatar
  • 2,867
1 vote
1 answer
573 views

MySQL CPU pegged on specific query

Very similar (almost exact) to this question: Poor performance on midsized site / Queries without index? CPU keeps getting pegged to 100% for MySQL, which makes the admin interface very slow (the ...
hisnameisjimmy's user avatar
1 vote
0 answers
1k views

PHP memory limit, is 1024 MB too much?

I just had some problems with an update exhausting my memory. But I already had the PHP memory limit at 512 MB, and I had to take it up to 1024 MB! I know this is relative but, is this too much? How ...
cballenar's user avatar
  • 1,419