Too many Chunks and Snippets

So from a “Total time” of 1.033 seconds, 0.996 seconds are spent for “Prepared and processed TVs”!

Do you really need the &processTVs=`1` property?
How much faster is the query with &processTVs=`0` ?


Just ballpark figures, how many results does this pdoResources query return? 100? 1000? 10’000?
Is this amount likely to grow larger in the future?

It has brought it down dramatically.

0.0307710: Prepared and processed TVs
0.0015299: Loaded "modChunk" with name "gameUpcomingHome"
0.0393639: Returning processed chunks
0.0964980: <b>Total time</b>

I always thought you needed the &processTVs=1` set to 1 if you had TV’s in a resource. When you set &processTVs=1, the snippet will include the TV values in the output, allowing you to display them. I thought from that, if you set it to 0, they would show in the pdoResources.

With &includeTVs you decide, which TVs get included in the query. But their values are the raw values from the database.

With &processTVs you define, which TVs get rendered according to their “Output Type” (set in the tab “Output Options”). Besides 0 or 1 you can also use a list of TVs as the value, to process only a selection of the included TVs.

So I could have my processTVs like below?

  &processTVs=`Foireann_1_Name,
    Foireann_1_Score,
    Foireann_1_Crest,
    Foireann_2_Name,
    Foireann_2_Score,
    Foireann_2_Crest,
    Cluiche_Competition,
    Cluiche_Date,
    Cluiche_Venue`

You could, but then your snippet call is slow again.

Only process the TVs you really have to.

Nope…I’ll leave it like below because it has increased the speed. I’ll have a look at the other pdoResources too

  &processTVs=`0`
  &includeTVs=`Foireann_1_Name,
    Foireann_1_Score,
    Foireann_1_Crest,
    Foireann_2_Name,
    Foireann_2_Score,
    Foireann_2_Crest,
    Cluiche_Competition,
    Cluiche_Date,
    Cluiche_Venue`

To all who have helped me…I thank you. I changed the processTVs=0 were I could and my site now loads much quicker than it did - Load: 1.24 s.

2 Likes

you could also use &prepareSnippet to calculate things.
pdoTools / Classes / pdoTools / Extras / docs.modx.pro