[TYPO3-mvc] Caching view parts
Bastian Waidelich
bastian at typo3.org
Mon Jun 4 12:57:15 CEST 2012
Henjo Hoeksma wrote:
Hi Henjo,
> I am running into performance issues with a search box that lists a result
> of persons.
To avoid running into memory & performance issues when rendering search
results, you can also circumvent the default persistence layer by adding
a custom findBy*() method to your repository or some service class that
interacts with the database directly.
I've done this yesterday exemplarily for the blog_example by adding a
tag cloud that renders all tags of all posts scaled by popularity [1]
If you look into TagCloudService.php you can see that this service
directly interacts with the database.
Of course you loose some flexibility when working with arrays instead of
objects, but for a search result this should not be a big issue.
You can even use the eID mechanism of TYPO3 to fetch results even faster
for a realtime AJAX search.
HTH,
[1] https://review.typo3.org/#/c/2511/
--
Bastian Waidelich
TYPO3 Core Team Member
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-project-typo3v4mvc
mailing list