Feature #17726
closedSpeed up link rendering by implementing some local caches
0%
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
Updated by Benni Mack over 16 years ago
hey masi,
quick question: Where is the speed improvement gonna happen? In the famous "first hit" of a webpage?
Updated by Martin Kutschker over 16 years ago
Benjamin,
mostly, but also for any non cached content (USER_INT). But also nice for BE preview or config.no_cache=1 during development.
Updated by Bartosz Aninowski over 16 years ago
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.
Updated by Martin Kutschker over 16 years ago
A new morining, a new patch. I hope this time without typos.
Updated by Bartosz Aninowski over 16 years ago
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
Updated by Martin Kutschker over 16 years ago
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.
Updated by Bartosz Aninowski over 16 years ago
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.
Updated by Martin Kutschker over 16 years ago
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);
}