Project

General

Profile

Actions

Bug #20195

closed

logDeprecatedFunction() significantly slows down TYPO3

Added by Jochen Rau over 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2009-03-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The call of logDeprecatedFunction() in t3lib_div significantly slows down the execution of TYPO3. In addition it produces a huge log file in a short period of time (over 300 MB file size in my case). I encountered this problem because I used t3lib_div::makeInstanceClassName() in one of my extensions (t3lib_div::makeInstanceClassName() will become deprecated in 4.3). A profiling session showed that the call of fwrite() in t3lib_div::deprecationLog() was responsible for the slow execution time.

t3lib_div::makeInstanceClassName() to one of your extensions ;-)

(issue imported from #M10707)


Files

10707_v1.diff (2.71 KB) 10707_v1.diff Administrator Admin, 2009-04-01 04:08

Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Feature #20876: Integrate possibility to enable/disable the deprecation loggingClosedOliver Hader2009-08-13

Actions
Actions #1

Updated by Steffen Müller over 15 years ago

I'd suggest to make this logging feature configurable with
$TYPO3_CONF_VARS['SYS']['depecationLog'], maybe similar to
t3lib_div::syslog).

Possible targets could be:
- don't log at all

- log to file
- log to OS syslogd
- log to php error_log

- log to t3lib_div::devlog
- log to t3lib_div::syslog

Actions #2

Updated by Oliver Hader over 15 years ago

Jochen, thanks for pointing it out.
Of course there shall be a switch in the install tool to disable this logging on productive websites.

Actions #3

Updated by Christian Kuhn over 15 years ago

Attached a patch that implements a new install tool option (default: true)
$TYPO3_CONF_VARS['SYS']['enableDeprecationLogFile']

Actions #4

Updated by Steffen Müller over 15 years ago

Better name it $TYPO3_CONF_VARS['SYS']['enableDeprecationLog'] which does chain us to a logging target and is open for future development

Actions #5

Updated by Chris topher about 15 years ago

This is related to #20876 which has been committed.

Satisfying solution?

Actions #6

Updated by Oliver Hader about 15 years ago

The new install tool setting is called "enableDeprecationLog" which is enabled by default.
As already mentioned it was committed to SVN Trunk in issue #20876

Actions

Also available in: Atom PDF