Issue Bug Closed

#23486nested menu generates huge number of mysql queries

Rutger Rek 08/31/10, 15:23 updated 03/06/14, 09:23

Description

I’m experiencing performance problems on a typo3 installation of version 4.3.5. At some point mySQL logged 40.000+ queries for the generation of just 1 page. Turning of the mainmenu reduced the number significantly to about 715 queries, .. still quite a lot.

At first I turned off the setting “expAll = 1” in TMENU. Without it typo3 generated about 800 queries for the homepage. when only the first level has “expAll = 1” set, typo3 generated between 2000 and 4000 queries per page. Then I rebuild the menu in TS with just CONTENT objects, still the same problem occurs. After that I tried appending the TMENU with a content element (like below), and again same problem

lib.menu = HMENU
lib.menu {
entryLevel = 0
wrap =
    |

1 = TMENU
1 {
NO = 1
NO {
ATagTitle.field = description
wrapItemAndSub =
  • |

  • stdWrap.htmlSpecialChars = 1
    after.stdWrap.cObject = COA
    after.stdWrap.cObject {
    stdWrap.wrap = <ul>|</ul>
    10 = CONTENT
    10 {
    table = pages
    select {
    selectFields = title as cow, uid as chicken
    pidInList.field = uid
    }
    renderObj = TEXT
    renderObj {
    field = cow
    wrap = <li>|</li>
    typolink.parameter.field = chicken
    }
    }
    stdWrap.if.isTrue.numRows.table = pages
    stdWrap.if.isTrue.numRows.select.pidInList.field = uid
    }
    }
    …
    When menu is generated with the code above, the log contains a vew cows and chickens but an awfull lot of the same queries being executed

    (issue imported from #M15609)

    Reviews 0

    No change resolves or names this issue in its commit message, and no comment links one.