TYPO3 6.2 performance, Typoscript Select, Typoscript Cache -


the problem solved, question still open cause want test tipps krystian. see edit 3 @ bottom of question.

i have typo3 project slow. did tests , found problems.

i tested startpage, startpage containers 2 news list (total 9 articles) (tx_news version 2.3.0 - not newest one). contains menu (created fluid v:page.menu), footer (also created v:page.menu), right column (mainly image content elements, gathered page typoscript) , news-taglist (created typoscript). news-taglist used twice - once in menu , once in right column.

first performance overview:

no menu/no footer (without taglist), no news, no labellist  0.65s  menu , footer (without taglist) 0.95s  menu , footer (with taglist) 2.3s  menu , footer (with taglist) , taglist in right column 3s  4.2s 

a big point taglist (right there total of 1303 tags). here typoscript generate taglist:

plugin.tx_mytemplate {     newstags = content     newstags {         table = tx_news_domain_model_tag         select {             pidinlist = 1,589             hidden = 0             deleted = 0             orderby = title         }         orderby = title         renderobj = coa         renderobj {             1 = load_register             1 {                 counter.cobject = text                 counter.cobject.data = register:counter                 counter.cobject.wrap = |+1                 counter.prioricalc = intval             }             2 = text             2.insertdata = 1             2 = text             2.insertdata = 1             2.field = title             2.typolink {                 # link page                 parameter = 588                 # current tag                 additionalparams = &tx_news_pi1[overwritedemand][tags]={field:uid}                 additionalparams.insertdata = 1              }             2.wrap = <li  data-test="{field:uid}" data-index="{register:counter}">|</li>          }         wrap = <ul>|</ul>     } } 

i use once in menu , once in content element with:

<f:cobject typoscriptobjectpath="plugin.tx_mytemplate.newstags" /> 

what don't understand is, understanding there should not big difference in using once or twice (or more), cause after first use typoscript-object should created , there no need create second time. missing here?

this sql:

select * tx_news_domain_model_tag tx_news_domain_model_tag.pid in (1,589) , tx_news_domain_model_tag.deleted=0 , tx_news_domain_model_tag.hidden=0 order title; 

it needs 0.004s execute query. other point don't understand is, why expensive create typoscript-object? typolink used create 1303 links? (i used realurl)

also, taglist not change often, somehow possible full cache it? , example create new taglist when flush general caches (or frontend cahches) executed?

any other ideas? ( know load taglist via ajax after page loaded, last work around , maybe there better solutions)

edit: tested taglist without typolink , around 1s faster. means create typolink 1303 link costs around 1s.

edit 2: found hidden config.no_cache = 1 , testing right if works when cache enabled. anyway interessted why typolink expensive.

.

edit 3: test krystians answer:

cache typoscript object stdwrap.cache.key = somehash

plugin.tx_mytemplate {     newstags = content     newstags {         table = tx_news_domain_model_tag         select {             pidinlist = 1,589             hidden = 0             deleted = 0             orderby = title         }         orderby = title         renderobj = coa         renderobj {             1 = load_register             1 {                 counter.cobject = text                 counter.cobject.data = register:counter                 counter.cobject.wrap = |+1                 counter.prioricalc = intval             }             2 = text             2.insertdata = 1             2 = text             2.insertdata = 1             2.field = title             2.typolink {                 # link page                 parameter = 588                 # current tag                 additionalparams = &tx_news_pi1[overwritedemand][tags]={field:uid}                 additionalparams.insertdata = 1              }             2.wrap = <li  data-test="{field:uid}" data-index="{register:counter}">|</li>          }         wrap = <ul>|</ul>         stdwrap.cache.key = mytaglist         stdwrap.cache.lifetime = unlimited     } } 

i can't see changes in loading time. there way check if object gets cached? did wrong?

using vhs cache content v:render.cache

i replaced

<f:cobject typoscriptobjectpath="plugin.tx_mytemplate.newstags" /> 

with

<v:render.cache content="<f:cobject typoscriptobjectpath='plugin.tx_mytemplate.newstags' />" identity="test1234" /> 

it seems work, cause first call needs longer. next call "normal" (as not use v.render.cache) until take content part out , use identify:

<v:render.cache content="test" identity="test1234" /> 

this faster , still displays taglist. works far, cached version behind test1234 used. seems render f:cobject typoscript object in content part every time. missing here?

even stranger is, when use code content="test"and flush frontend caches , flush general caches taglist still displayed (and not "test"). docu says: the cache behind viewhelper extbase object cache, cleared when clear page content cache.. page content cache? not 1 of 2 flush frontend caches or flush general caches ?

edit 4: cache enabled found problem news plugin. use realurl newsplugin:

'category' => array(                 array(                     'getvar' => 'tx_news_pi1[overwritedemand][categories]',                     'lookuptable' => array(                             'table' => 'tx_news_domain_model_category',                             'id_field' => 'uid',                             'alias_field' => 'concat(title, "-", uid)',                             'addwhereclause' => ' , not deleted',                             'useuniquecache' => 1,                             'useuniquecache_conf' => array(                                     'strtolower' => 1,                                     'spacecharacter' => '-'                             )                     )                 )             ),             'tag' => array(                 array(                     'getvar' => 'tx_news_pi1[overwritedemand][tags]',                     'lookuptable' => array(                             'table' => 'tx_news_domain_model_tag',                             'id_field' => 'uid',                             'alias_field' => 'concat(title, "-", uid)',                             'addwhereclause' => ' , not deleted',                             'useuniquecache' => 1,                             'useuniquecache_conf' => array(                                     'strtolower' => 1,                                     'spacecharacter' => '-'                             )                     )                 )             ), 

calling category link works without problem, when call tag link see news first hit (changing tag not affect anything, still shows news filtered first tag). seems went wrong there cache, can not figure out what. me categories , tag looks pretty same, difference parameter, realurl should handle that.

try that:

plugin.tx_mytemplate = text plugin.tx_mytemplate {   stdwrap.cache.key = mytaglist   stdwrap.cache.lifetime = unlimited   stdwrap.append = content   stdwrap.append {     # ... ts   } } 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -