Feature #17726
closed
Speed up link rendering by implementing some local caches
Added by Martin Kutschker over 16 years ago.
Updated almost 14 years ago.
Description
tslib_content::typolink uses some functions of t3lib_pageSelect (via tslib_fe) that are likley to be called with the same arguments during the rendering of a single page. As these functions make SQL queries caching their results.
(issue imported from #M6601)
Files
hey masi,
quick question: Where is the speed improvement gonna happen? In the famous "first hit" of a webpage?
Benjamin,
mostly, but also for any non cached content (USER_INT). But also nice for BE preview or config.no_cache=1 during development.
Hey Masi
Thanks for your work.
I've downloaded latest trunk sources and my website is working ok.
If I apply your patch (with no errors) I have
"Error!
The requested page does not exist"
Tell me how to debug this and I provide more info.
A new morining, a new patch. I hope this time without typos.
I've manually made changes to 4.1.2 version. No any erros but T3 still sends query to database.
Look at this link http://phpfi.com/271806
This is complete mysqld log for cached page with user_int extension and 20 records containing 3 links
Bart, with manual changes you mean you have copied the code from the diff manually?
The log shows an active BE session, so the page will not render from cache. Anyway I wonder why the page with id 83 is queried so many times? If the patch versioned of getPage() is used this should not happen.
Yes. I've copied manulay.
Yes the log show active BE session but page is render form cache. admPanel show no_cache=0 and parse time for other pages is 40ms so it must be cached.
I need BE session to check parse time.
Check this link http://phpfi.com/271817
This is my testing code. You can find there rendering 20 records with and without T3 templating engin. At line 86 an 87 I am calling typolink.
Please find atached patched class.t3lib_page.php from 4.1.2 source.
Bart, you have applied the first and broken version of the patch:
In function getPage you must make this change to make the cache work:
$this->versionOL('pages',$row);
if (is_array($row)) {
$result = $this->getPageOverlay($row);
}
Also available in: Atom
PDF