Task #54605

Epic #55070: Workpackages

Epic #55065: WP: Overall System Performance (Backend and Frontend)

Epic #55656: Optimize overall Extbase performance

Inject annotations should not be used by core (~5% performance)

Added by Claus Due almost 6 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Category:
Extbase
Target version:
Start date:
2013-12-26
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The case:

Using inject annotations requires the Reflection framework to do expensive runtime analysis of all classes that get loaded (given: only once, if they are Singletons). This extra overhead (I measured it to around 5% in a pretty basic environment with a few extbase plugins) can be very easily avoided by always using injection methods.

I would personally have the core's classes always use injection methods to increase performance of the base system - and warn users in documentation, that inject annotations should be expected to slow down the code by approximately 5% (also affecting cached contexts, especially affecting the backend).

In our quest for better performance we can take this very easy path without any damage.

A revert merge request is coming right up.


Related issues

Related to TYPO3 Core - Task #68786: Replace @inject with inject methods in other extensions Closed 2015-08-06

Associated revisions

Revision 3d3d7aee (diff)
Added by Wouter Wolters about 4 years ago

[TASK] Replace @inject with inject methods in ext:extbase

Because of performance reasons we replace
the @inject annotations back to inject methods.

Resolves: #54605
Releases: master
Change-Id: I433e2ecccc2aa319ec8904dbc65b84f63e9959aa
Reviewed-on: http://review.typo3.org/42270
Reviewed-by: Stefan Neufeind <>
Tested-by: Stefan Neufeind <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

Revision 11bb45f7 (diff)
Added by Wouter Wolters about 4 years ago

[FOLLOWUP][TASK] Replace @inject with inject methods in ext:extbase

Wrong inject method name for objectManager.

Resolves: #54605
Releases: master
Change-Id: I2e8ef1656b514ba547ccc248a17ea4961c1aa5cf
Reviewed-on: http://review.typo3.org/42277
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision e211a7b0 (diff)
Added by Wouter Wolters about 4 years ago

[TASK] Replace @inject with inject methods in other extensions

Because of performance reasons we replace
the @inject annotations back to inject methods.

Resolves: #68786
Related: #54605
Releases: master
Change-Id: Ifc9960c9ca279c05b4120c806147e49c1084c8d5
Reviewed-on: http://review.typo3.org/42310
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Gerrit Code Review almost 6 years ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26565

#2 Updated by Gerrit Code Review almost 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26565

#3 Updated by Markus Klein almost 6 years ago

Please check if #52040 should be reverted as well then.

Maybe also search the complete log for such @inject changes.

#4 Updated by Marc Bastian Heinrichs over 5 years ago

  • Category set to Extbase
  • Assignee set to Marc Bastian Heinrichs
  • Target version set to next-patchlevel
  • Parent task set to #55656

#5 Updated by Marc Bastian Heinrichs over 5 years ago

I'm on evaluating this and have a new patchset in the pipeline.

#6 Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29453

#7 Updated by Gerrit Code Review about 4 years ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42270

#8 Updated by Gerrit Code Review about 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42270

#9 Updated by Gerrit Code Review about 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42270

#10 Updated by Wouter Wolters about 4 years ago

  • Status changed from Under Review to Resolved

#11 Updated by Gerrit Code Review about 4 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42277

#12 Updated by Wouter Wolters about 4 years ago

  • Status changed from Under Review to Resolved

#13 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF