[TYPO3-dev] Performance improvement: caching of MENUDATA
Ralf Hettinger
ng at ralfhettinger.de
Sun Dec 20 13:56:40 CET 2009
Hi folks.
I'm just performance tuning a site which uses extensive HMENUs (expAll=1
down some levels on a large tree) and it turns out that menu generation
takes quite a lot time (just to clarify: this of course affects only
sites not coming from page cache. After being cached once, all is good).
After having a closer look at
typo3/sysext/cms/tslib/class.tslib_menu.php and taking times here and
there it turned out, that too much time is spent by storing single menu
items into cache table (MENUDATA entries).
So I just turned off this storage into cache - and voila: this works
just like a charm here, each item gets a speedup of factor ~10 (!)
I just wondered if you had similar experiences or what possible side
effects I'm overseeing: it's my impression that MENUDATA caching may be
obsolete with more current PHP/TYPO3 versions, since the process of
accessing database for reading (or even worse: storing) MENUDATA into
cache takes longer than just generating the menu. At least I would think
that this item caching should be made configurable, an example follows.
For easy reproduction and testing I'm attaching a patch, that
-1-
allows you to turn of caching MENUDATA by using new TS parameter
skipItemCache, e.g.
1 = TMENU
1.skipItemCache = 1
[...]
-2-
will show you the times for menu item generation in Admin Panel (look
for 'page.makeMenu for id')
Looking forward for you replies.
Cheers
Ralf
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: skipItemCache-trunk-rev6683.patch
URL: <http://lists.typo3.org/pipermail/typo3-dev/attachments/20091220/bd006d57/attachment.txt>
More information about the TYPO3-dev
mailing list