[BUGFIX] Reduce expensive calls in AbstractMenuContentObject
This patch reduces the number of SQL queries and PHP calls which get performed when rendering menus. The patch has two parts: * Runtime cache is used to remember a generated link and is given a cache identifier which includes a hash of all parameters which may affect the link. * Runtime cache is used to remember the decision if a page is a submenu. The item rendering function is called every time the same page is rendered in any menu in the same request, and the decision function to check if page is a sub-menu is called at least three times with the same UID when generating a menu. Both of these implements together reduce the necessary re-calling of methods which generate the same output given the same arguments. Change-Id: Idd6225081e8fb3f8160270af3d865b48208b756e Releases: master, 7.6 Resolves: #78693 Reviewed-on: https://review.typo3.org/50652 Tested-by:TYPO3com <no-reply@typo3.com> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Tested-by:
Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by:
Stefan Neufeind <typo3.neufeind@speedpartner.de> Reviewed-by:
Daniel Alder <dalder@snowflake.ch> Tested-by:
Daniel Alder <dalder@snowflake.ch> Reviewed-by:
Joerg Boesche <typo3@joergboesche.de> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de>
Showing
- typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php 24 additions, 0 deletions.../Classes/ContentObject/Menu/AbstractMenuContentObject.php
- typo3/sysext/frontend/Tests/Unit/ContentObject/Menu/AbstractMenuContentObjectTest.php 7 additions, 1 deletion...Unit/ContentObject/Menu/AbstractMenuContentObjectTest.php
Please register or sign in to comment