Hi,
Every time when we call
JLayoutHelper::render('path.tp.layout');
or real code from admin area
$layout = new JLayoutFile('joomla.toolbar.title');
$html = $layout->render(array('title' => $title, 'icon' => $icon));
then JLayoutFile object running refreshIncludePaths method 3 times not depending from any condition:
As a result if we want to display just 4 lines of admin title
<h1 class="page-title">
<span class="icon-<?php echo $icon; ?>"></span>
<?php echo $displayData['title']; ?>
</h1>
we spend 3-5% of total time. In my server it is 4-5ms what is a lot. Sugest to rework this engine at the beginning and make more efficiant.
Labels |
Added:
?
|
I have seen this article. System file access it is not what i mean. Layout engine slow itself because make a lot of preparations and in most cases thay are repeated. If you use the same layout 10 times then all operations repeated 10 time as if was used first time. At least i don't see code which reuse the same layout. And why is it calling refreshIncludePaths methos 3 times?
yes, it is what is really need
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-12-06 18:23:13 |
Are you using cache in your site?
Check this: http://phproberto.com/en/blog/21-joomla-rendering-benchmarks