Bug #76581 » perf.diff
typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php | ||
---|---|---|
$node->setHasChildren(TRUE);
|
||
/** @var $childNodes \TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection */
|
||
$childNodes = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\SortedTreeNodeCollection');
|
||
$basicNode->getChildNodes()->asort();
|
||
foreach ($basicNode->getChildNodes() as $child) {
|
||
$childNodes->append($this->buildRepresentationForNode($child, $node, $level + 1));
|
||
$childNodes[] = $this->buildRepresentationForNode($child, $node, $level + 1);
|
||
}
|
||
$node->setChildNodes($childNodes);
|
||
}
|
typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php | ||
---|---|---|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||
use TYPO3\CMS\Core\Utility\PathUtility;
|
||
use TYPO3\CMS\Core\Cache\CacheManager;
|
||
/**
|
||
* The TypoScript parser
|
||
... | ... | |
* @todo Define visibility
|
||
*/
|
||
public function parse($string, $matchObj = '') {
|
||
$this->raw = explode(LF, $string);
|
||
$this->rawP = 0;
|
||
$pre = '[GLOBAL]';
|
||
while ($pre) {
|
||
if ($this->breakPointLN && $pre === '[_BREAK]') {
|
||
$this->error('Breakpoint at ' . ($this->lineNumberOffset + $this->rawP - 2) . ': Line content was "' . $this->raw[($this->rawP - 2)] . '"', 1);
|
||
break;
|
||
$typoscriptCache = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_typoscript');
|
||
//var_export($typoscriptCache->get(md5($string)));die();
|
||
$hash = md5($string.serialize($matchObj));
|
||
if (($cached = $typoscriptCache->get($hash)) !== false) {
|
||
foreach ($cached as $key => $value) {
|
||
$this->$key = $value;
|
||
}
|
||
$preUppercase = strtoupper($pre);
|
||
if ($pre[0] === '[' &&
|
||
($preUppercase === '[GLOBAL]' ||
|
||
$preUppercase === '[END]' ||
|
||
!$this->lastConditionTrue && $preUppercase === '[ELSE]')
|
||
) {
|
||
$pre = trim($this->parseSub($this->setup));
|
||
$this->lastConditionTrue = 1;
|
||
} else {
|
||
// We're in a specific section. Therefore we log this section
|
||
$specificSection = $preUppercase !== '[ELSE]';
|
||
if ($specificSection) {
|
||
$this->sections[md5($pre)] = $pre;
|
||
} else {
|
||
$this->raw = explode(LF, $string);
|
||
$this->rawP = 0;
|
||
$pre = '[GLOBAL]';
|
||
while ($pre) {
|
||
if ($this->breakPointLN && $pre === '[_BREAK]') {
|
||
$this->error('Breakpoint at ' . ($this->lineNumberOffset + $this->rawP - 2) . ': Line content was "' . $this->raw[($this->rawP - 2)] . '"', 1);
|
||
break;
|
||
}
|
||
if (is_object($matchObj) && $matchObj->match($pre) || $this->syntaxHighLight) {
|
||
if ($specificSection) {
|
||
$this->sectionsMatch[md5($pre)] = $pre;
|
||
}
|
||
$preUppercase = strtoupper($pre);
|
||
if ($pre[0] === '[' &&
|
||
($preUppercase === '[GLOBAL]' ||
|
||
$preUppercase === '[END]' ||
|
||
!$this->lastConditionTrue && $preUppercase === '[ELSE]')
|
||
) {
|
||
$pre = trim($this->parseSub($this->setup));
|
||
$this->lastConditionTrue = 1;
|
||
} else {
|
||
$pre = $this->nextDivider();
|
||
$this->lastConditionTrue = 0;
|
||
// We're in a specific section. Therefore we log this section
|
||
$specificSection = $preUppercase !== '[ELSE]';
|
||
if ($specificSection) {
|
||
$this->sections[md5($pre)] = $pre;
|
||
}
|
||
if (is_object($matchObj) && $matchObj->match($pre) || $this->syntaxHighLight) {
|
||
if ($specificSection) {
|
||
$this->sectionsMatch[md5($pre)] = $pre;
|
||
}
|
||
$pre = trim($this->parseSub($this->setup));
|
||
$this->lastConditionTrue = 1;
|
||
} else {
|
||
$pre = $this->nextDivider();
|
||
$this->lastConditionTrue = 0;
|
||
}
|
||
}
|
||
}
|
||
if ($this->inBrace) {
|
||
$this->error('Line ' . ($this->lineNumberOffset + $this->rawP - 1) . ': The script is short of ' . $this->inBrace . ' end brace(s)', 1);
|
||
}
|
||
if ($this->multiLineEnabled) {
|
||
$this->error('Line ' . ($this->lineNumberOffset + $this->rawP - 1) . ': A multiline value section is not ended with a parenthesis!', 1);
|
||
}
|
||
$this->lineNumberOffset += count($this->raw) + 1;
|
||
$typoscriptCache->set($hash, $this);
|
||
}
|
||
if ($this->inBrace) {
|
||
$this->error('Line ' . ($this->lineNumberOffset + $this->rawP - 1) . ': The script is short of ' . $this->inBrace . ' end brace(s)', 1);
|
||
}
|
||
if ($this->multiLineEnabled) {
|
||
$this->error('Line ' . ($this->lineNumberOffset + $this->rawP - 1) . ': A multiline value section is not ended with a parenthesis!', 1);
|
||
}
|
||
$this->lineNumberOffset += count($this->raw) + 1;
|
||
}
|
||
/**
|
typo3/sysext/core/Configuration/DefaultConfiguration.php | ||
---|---|---|
),
|
||
'groups' => array('system')
|
||
),
|
||
'cache_typoscript' => array(
|
||
'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
|
||
'backend' => 'TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend',
|
||
'options' => array(
|
||
'defaultLifetime' => 0,
|
||
),
|
||
'groups' => array('system')
|
||
),
|
||
),
|
||
),
|
||
'defaultCategorizedTables' => 'pages,tt_content,sys_file_metadata', // List of comma separated tables that are categorizable by default.
|
- « Previous
- 1
- 2
- 3
- Next »