Task #55173

Optimize invocation of cObj::checkIf

Added by Oliver Hader over 5 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
Start date:
2014-01-20
Due date:
% Done:

100%

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

Description

The stdWrap property "if" can be used to allow output only if a defined criterium is met.
However, the checkIf() method gets called even if the property is not set in TypoScript.

Associated revisions

Revision afaa0560 (diff)
Added by Oliver Hader over 5 years ago

[TASK] Optimize invocation of cObj::checkIf

The stdWrap property "if" can be used to allow output only if a
defined criterion is met. However, the checkIf() method gets
called even if the property is not set in TypoScript.

Fix this by adding a quick empty() check to all calls.
Also optimizes the code structure to exit early in case the if
does not evaluate to TRUE.

Resolves: #55173
Releases: 6.3, 6.2
Change-Id: Ie1178a5df2e98fd19b848aa2300c901c1200f555
Reviewed-on: https://review.typo3.org/26943
Reviewed-by: Simon Schaufelberger
Reviewed-by: Stefan Neufeind
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Markus Klein
Tested-by: Markus Klein

Revision 73586569 (diff)
Added by Oliver Hader over 5 years ago

[TASK] Optimize invocation of cObj::checkIf

The stdWrap property "if" can be used to allow output only if a
defined criterion is met. However, the checkIf() method gets
called even if the property is not set in TypoScript.

Fix this by adding a quick empty() check to all calls.
Also optimizes the code structure to exit early in case the if
does not evaluate to TRUE.

Resolves: #55173
Releases: 6.3, 6.2
Change-Id: Ie1178a5df2e98fd19b848aa2300c901c1200f555
Reviewed-on: https://review.typo3.org/31418
Reviewed-by: Markus Klein
Tested-by: Markus Klein

History

#1 Updated by Gerrit Code Review over 5 years ago

  • Status changed from New 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 https://review.typo3.org/26943

#2 Updated by Gerrit Code Review over 5 years ago

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/26943

#3 Updated by Gerrit Code Review over 5 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/26943

#4 Updated by Gerrit Code Review over 5 years ago

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

#5 Updated by Gerrit Code Review over 5 years ago

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

#6 Updated by Oliver Hader over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Riccardo De Contardi almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF