Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2007-10-26
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

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

bug_6601_v2.diff (4.41 KB) bug_6601_v2.diff Administrator Admin, 2007-10-27 10:56
class.t3lib_page.php (51.9 KB) class.t3lib_page.php Administrator Admin, 2007-10-27 12:36

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #18665: The child pages of Mount points (do not substitute mount point) are not linked correctly in menusClosedDmitry Dulepov2008-04-22

Actions
Actions #1

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?

Actions #2

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.

Actions #3

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.

Actions #4

Updated by Martin Kutschker over 16 years ago

A new morining, a new patch. I hope this time without typos.

Actions #5

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

Actions #6

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.

Actions #7

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.

Actions #8

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);
}

Actions

Also available in: Atom PDF