Let's Optimise Joomla!1.5

Discussion regarding Joomla! 1.5 Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security and Performance FAQs
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5

Post by Physicist » Thu Nov 06, 2008 9:40 pm

It is known that one of weak points of Joomla!1.5 is its performance. It forces many users to continue using 1.0 branch. For this reason optimisation of Joomla!1.5 should be one of priorities.

I have profiled Joomla!1.5.7 using xdebug on PHP5.2.4.

It has shown two following "weak points":
  • Method JRegistryFormatINI::stringToObject, parsing data in an ini-file format (this function can take up to 20% of generation time), and
  • Method JLoader::load, called from __autoload function for automatic including of the class-declaration files.
What methods of struggle against these "drags" can be?

(If you don't wish to go into details, I've attached a cumulative patch.)
You do not have the required permissions to view the files attached to this post.
Last edited by Physicist on Sat Nov 08, 2008 11:53 am, edited 1 time in total.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5

Post by Physicist » Thu Nov 06, 2008 9:43 pm

Method JRegistryFormatINI::stringToObject

It is possible to try to rewrite this method for speeding-up. The basic ideas (which can accelerate its work) are the following:
  • During the method work, the condition if($process_sections) is regularly checked in a cycle. These checks can be taken out cycle boundary (by duplicating a cycle).
  • Method checks only presence of the comments beginning with ";", while actually comments in language ini-files begin with "#". Check of such a condition will remove unnecessary operations with these lines.
  • The test has shown that faster to break a string on two parts by means of explode function (instead of strpos/substr).
  • The result for strpos-search of "|" can be saved and then don't call unnecessary str_replace (if there is no "|").
  • In preg_match and preg_split it is desirable to use identical limiters of regular expressions. It will remove additional parsing and compilation of the second expression.
  • The condition of parameter value is array easier to write down as $array=count($parts)>1, instead of comparison of strings.
  • Splitting of argument into lines is performed even in the case when the answer is already contained in $inistocache.
As a result, it is possible to increase speed of this method by 19% (accordingly, the total speed by 4%).
You do not have the required permissions to view the files attached to this post.
Last edited by Physicist on Sat Nov 08, 2008 11:53 am, edited 1 time in total.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5

Post by Physicist » Thu Nov 06, 2008 9:46 pm

The analysis of passed arguments has shown, that at modules rendering their parameters are passed to this method twice: once in method JDocumentRendererModule::render, and the second in (called by it) method JModuleHelper::renderModule. And though the second call is performed much faster since the result of the first call is saved in $inistocache, it would be logical to avoid this call. For this purpose it is enough to pass module parameters as the third argument in JModuleHelper::renderModule.
libraries/joomla/document/html/renderer/module.php wrote: //get module parameters
$mod_params = new JParameter( $module->params );

$contents = '';
if ($mod_params->get('cache', 0) && $conf->getValue( 'config.caching' ))
{
$cache =& JFactory::getCache( $module->module );

$cache->setLifeTime( $mod_params->get( 'cache_time', $conf->getValue( 'config.cachetime' ) * 60 ) );
$cache->setCacheValidation(true);

$contents = $cache->get( array('JModuleHelper', 'renderModule'), array( $module, $params, $mod_params ), $module->id. $user->get('aid', 0) );
} else {
$contents = JModuleHelper::renderModule($module, $params, $mod_params);
}
libraries/joomla/application/module/helper.php wrote: // NOTE: This method doesn't have a description!!!
function renderModule($module, $attribs = array(), $params = null)
{
...
// Get module parameters
if($params == null)
$params = new JParameter( $module->params );
You do not have the required permissions to view the files attached to this post.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5

Post by Physicist » Thu Nov 06, 2008 9:48 pm

If the "System - Debug" plugin is enabled, then even at the disabled debug mode the language file of this plugin is loaded (and as it has already been told, parsing of language files occupies an appreciable part of time). So I recommend to add check in the constructor before load of language file:
plugins/system/debug.php wrote: function plgSystemDebug(& $subject, $config)
{
// Do not initiate if debugging is not enabled
if(!JDEBUG) return;


parent::__construct($subject, $config);
You do not have the required permissions to view the files attached to this post.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5 (highly recommended patch!)

Post by Physicist » Thu Nov 06, 2008 9:50 pm

The lion's share of all calls is occupied with parsing of language files. Since these files do not vary from a call to a call, it makes sense to cache results of parsing. For this purpose it is enough to make modification in JLanguage::_load. It would be logical to make ttl of this "language" cache adjusted in backend, but meantime let it will be same as for all site.
libraries/joomla/language/language.php wrote: function _load( $filename, $extension = 'unknown', $overwrite = true )
{
$result = false;

if(is_file($filename))
{
$conf =& JFactory::getConfig();
if($conf->getValue( 'config.caching' ))
{
$cache =& JFactory::getCache( 'language' );
$cache->_options['language'] = 'en-GB'; // disable dependence on language
$newStrings = $cache->call('JLanguage::_loadfile',$filename);
}
else
$newStrings = JLanguage::_loadfile($filename);


if ( is_array( $newStrings) )
{
$this->_strings = $overwrite ? array_merge( $this->_strings, $newStrings) : array_merge( $newStrings, $this->_strings);
$result = true;
}
}

// Record the result of loading the extension's file.
if ( ! isset($this->_paths[$extension])) {
$this->_paths[$extension] = array();
}

$this->_paths[$extension][$filename] = $result;

return $result;
}
// Load and parse ini-file
function _loadfile( $filename )
{
$content = @file_get_contents( $filename );
if($content)
{
$registry = new JRegistry();
$registry->loadINI($content);
return $registry->toArray();
}
return false;
}
You do not have the required permissions to view the files attached to this post.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5

Post by Physicist » Thu Nov 06, 2008 9:53 pm

Method JLoader::load

In the method strtolower function is called twice. The second call is obviously redundant.

JLoader::register returns the pointer, therefore let's replace "=" on "=&" (in JLoader::import too).
You do not have the required permissions to view the files attached to this post.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5 (highly recommended patch!)

Post by Physicist » Thu Nov 06, 2008 9:57 pm

As including of class declaration files takes a lot of time, it makes sense to combine the most frequent-included files into one file and to include it at start. Unfortunately, it is possible not for all classes, but the gain in speed will be appreciable. For construction of such a file it is enough to call an attached script /cache.php and to make small updating of /index.php.
index.php wrote: require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
// load precached class declarations (maybe it should be included into framework.php)
if(is_file( JPATH_BASE .DS.'classes.cache.php' ))
{
include_once ( JPATH_BASE .DS.'libraries'.DS.'loader.php' );
include_once ( JPATH_BASE .DS.'classes.cache.php' );
}

require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
You do not have the required permissions to view the files attached to this post.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5

Post by Physicist » Thu Nov 06, 2008 10:00 pm

After minimisation of losses from JRegistryFormatINI::stringToObject and JLoader::load it was found out, that the considerable part of time is taken also by methods JRegistry::getValue and (to a lesser degree) JRegistry::setValue. As in practically 100% of cases, arguments of these functions look like "namespace.parameter", functions should be optimised for this case.
You do not have the required permissions to view the files attached to this post.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5

Post by Physicist » Thu Nov 06, 2008 10:02 pm

Also it has been found out, that at generation of the frontpage calculating of count of news doesn't have absolutely optimum way. Why in /components/com_content/models/frontpage.php in a method getTotal to enquiry full number of news on frontpage, it is required to do query for full fetch instead of simple SELECT COUNT? Let’s improve this.
components/com_content/views/frontpage/view.html.php wrote: //set data model
$items =& $this->get('data');
$total = count($items);
if($total < $limit)
$total += $limitstart;
else
$total =& $this->get('total');
components/com_content/models/frontpage.php wrote: function getTotal()
{
// Lets load the content if it doesn't already exist
if (empty($this->_total))
{
$query = $this->_buildQuery(true);
$this->_db->setQuery( $query );
$this->_total = $this->_db->loadResult();

}

return $this->_total;
}

...

function _buildQuery($total = false)
{
...
$query = 'SELECT';
if($total) // get total number of items
$query .= ' COUNT(*)';
else
$query .=

...
You do not have the required permissions to view the files attached to this post.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5 (bug report)

Post by Physicist » Thu Nov 06, 2008 10:05 pm

Warning! In a file /components/com_content/views/frontpage/tmpl/default.php there is error leading to news are not displayed as links (because of twice adding num_intro_articles).
components/com_content/views/frontpage/tmpl/default.php wrote: <?php endfor;
$i = $i + $this->params->get('num_intro_articles') ;
else : // otherwise, order down columns, like old category blog
...
endif;?>
<?php //$i = $i + $this->params->get('num_intro_articles') ; ?>
The second addition leads to bug.
You do not have the required permissions to view the files attached to this post.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5

Post by Physicist » Thu Nov 06, 2008 10:07 pm

Also a lot of time takes reading of a cache files since for each cache element it is necessary to load two files (data and expiration time). Instead, I propose another storage handler with one file per cache element (ttl is saved in file modification time).
You do not have the required permissions to view the files attached to this post.
Last edited by Physicist on Thu Nov 06, 2008 10:11 pm, edited 1 time in total.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5

Post by Physicist » Thu Nov 06, 2008 10:10 pm

One of well-known methods of optimisation is use of persistent connections to mysql server. If you like to test this, in attachment you find corresponding database-handler file. Also I made some changes at backend to handy change of database handler in site config.
You do not have the required permissions to view the files attached to this post.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Let's Optimise Joomla!1.5

Post by Physicist » Thu Nov 06, 2008 10:13 pm

Clear-Old-Cache plugin allows to automatically removing old cache files from cache directory.
You do not have the required permissions to view the files attached to this post.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

User avatar
ircmaxell
Joomla! Ace
Joomla! Ace
Posts: 1926
Joined: Thu Nov 10, 2005 3:10 am
Location: New Jersey, USA
Contact:

Re: Let's Optimise Joomla!1.5

Post by ircmaxell » Fri Nov 07, 2008 12:22 am

Ok... Nice work (to start!)...

Let me first say, don't bother working on 1.5. Since it's in maintance mode, the vast majority of the changes simply won't be feasable (No API changes, etc)... I'd suggest working straight off trunk (what 1.6 will be ;-) )... With that said, I'll go through each one of your recommendations, and give my comments...

1. strToObject is definitely a huge weak point... I honestly think a full rewrite of the method is in order (I tried about 6 months ago and wasn't able to squeeze more than about 1% out of it, but I've gotten some new ideas, so...)

2. JLoader is not an issue anymore in 1.6 ;-)

3. Module params is an issue, however if cache is enabled, they shouldn't be loaded as is more than once for most modules. With that said, something can be done for 1.6...

4. Disabling the system debug plugin... I need to look, but IIRC it can still function with JDEBUG disabled, so I'm not sure if that's an option (I could be wrong).

5. Caching of language files. This one is tricky. I've looked into this, and from my tests, a cache call is just as expensive (and sometimes more so) than loading the language file. If more performance can be squeezed out of strToObject, it may make that even worse of a hit...

6. Merging of class definition files. I'm against this to be honest. Look at the compile time for the small classes, and you'll see it's a menial gain (less than 0.001 seconds for all the "small, common" files). It also reduces readability and maintainability....

7. JRegistry needs some php5 refactoring, so hopefully we can speed it up quite a bit there as well.

8. Count Queries. This needs complete refactor everywhere. It's really bad right now. Since 1.6 moves to MySQL 4.1.9 and higher, we can use SQL_CALC_FOUND_ROWS. That should greatly speed things up even more...

9. IMHO separate cache files are the best solution. The issue comes in when either a cache file is stale, or when running gc. To understand why, realize that a stale cache read only requires transferring 9 bytes of data (similarly, when running gc, it's only 9 bytes per file, which there can be thousands of). Realize that the average cache file is in the kilobyte range, and page cache files can be easily 20 or 30 kb or more data, and you'll see where the payoff in having the time stored separately is. The additional overhead when a cache hit happens is minimal compared to the large degradation when a stale hit happens...

10. Persistent connections. Honestly, I've actually seen (in my benchmarks) the exact opposite effect. When running large transaction rates, persistent connections actually slows things down significantly. Not to mention that it's added overhead that cannot be used with cgi...

11. Cleaning the cache via a plugin is not the best IMHO... Take a peak at 1.6, and you'll see a random number based shutdown function. So approximately 1 out of 100 requests will fire the GC. It'll be fired as php shuts down, so it has 0 effect on load speed to the end user...
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST

http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Re: Let's Optimise Joomla!1.5

Post by Physicist » Fri Nov 07, 2008 6:07 am

ircmaxell wrote: 5. Caching of language files. This one is tricky. I've looked into this, and from my tests, a cache call is just as expensive (and sometimes more so) than loading the language file. If more performance can be squeezed out of strToObject, it may make that even worse of a hit...
But my tests show that now it's certainly faster (and much faster).
ircmaxell wrote: 6. Merging of class definition files. I'm against this to be honest. Look at the compile time for the small classes, and you'll see it's a menial gain (less than 0.001 seconds for all the "small, common" files). It also reduces readability and maintainability....
Merging of class definition files is a good practice in most of framework. I don't recommend to use one file instead of several, but realize a mechanism to make such a file automatically from backend.
ircmaxell wrote: 9. IMHO separate cache files are the best solution. The issue comes in when either a cache file is stale, or when running gc. To understand why, realize that a stale cache read only requires transferring 9 bytes of data (similarly, when running gc, it's only 9 bytes per file, which there can be thousands of). Realize that the average cache file is in the kilobyte range, and page cache files can be easily 20 or 30 kb or more data, and you'll see where the payoff in having the time stored separately is. The additional overhead when a cache hit happens is minimal compared to the large degradation when a stale hit happens...
The more files the more time to find and load one file. The suggested cache-storage works with gc too (look at a code).
ircmaxell wrote: Persistent connections. Honestly, I've actually seen (in my benchmarks) the exact opposite effect. When running large transaction rates, persistent connections actually slows things down significantly. Not to mention that it's added overhead that cannot be used with cgi...
I know problems with pconnect, but sometimes it really works faster. I don't recomment to replace mysql_connect on mysql_pconnect, and to include presistent-connection-handler (if user like to try it).
ircmaxell wrote: Cleaning the cache via a plugin is not the best IMHO... Take a peak at 1.6, and you'll see a random number based shutdown function. So approximately 1 out of 100 requests will fire the GC. It'll be fired as php shuts down, so it has 0 effect on load speed to the end user...
The plugin uses random and shutdown to run gc ;-)
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

User avatar
ircmaxell
Joomla! Ace
Joomla! Ace
Posts: 1926
Joined: Thu Nov 10, 2005 3:10 am
Location: New Jersey, USA
Contact:

Re: Let's Optimise Joomla!1.5

Post by ircmaxell » Fri Nov 07, 2008 12:33 pm

Physicist wrote:
ircmaxell wrote: 5. Caching of language files. This one is tricky. I've looked into this, and from my tests, a cache call is just as expensive (and sometimes more so) than loading the language file. If more performance can be squeezed out of strToObject, it may make that even worse of a hit...
But my tests show that now it's certainly faster (and much faster).
I was doing the caching at the strToObject point, so there could be the overhead of loading the files, which is why you're seeing a different result
ircmaxell wrote: 6. Merging of class definition files. I'm against this to be honest. Look at the compile time for the small classes, and you'll see it's a menial gain (less than 0.001 seconds for all the "small, common" files). It also reduces readability and maintainability....
Merging of class definition files is a good practice in most of framework. I don't recommend to use one file instead of several, but realize a mechanism to make such a file automatically from backend.
I'm not convinced here... At that point, why not just precompile all of Joomla, and load everything like ROR does?
ircmaxell wrote: 9. IMHO separate cache files are the best solution. The issue comes in when either a cache file is stale, or when running gc. To understand why, realize that a stale cache read only requires transferring 9 bytes of data (similarly, when running gc, it's only 9 bytes per file, which there can be thousands of). Realize that the average cache file is in the kilobyte range, and page cache files can be easily 20 or 30 kb or more data, and you'll see where the payoff in having the time stored separately is. The additional overhead when a cache hit happens is minimal compared to the large degradation when a stale hit happens...
The more files the more time to find and load one file. The suggested cache-storage works with gc too (look at a code).
Well, I notice 2 issues with your suggestion.
1. What about filesystems with are set to not track modified times (Like my cache directory, because it's on a ramdrive)?
2. What about that your data may never expire on fastCGI or mod_php, because the stat cache is never flushed (and running clearstatcaceh() is expensive!!!).
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST

http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Re: Let's Optimise Joomla!1.5

Post by Physicist » Fri Nov 07, 2008 3:53 pm

ircmaxell, I don't propose replacement for current file-storage mechanism. However, I think Joomla can contains more alternative cache and database "drivers". Or, there should be a way to install additional (3rd-party) drivers. Users have the right to choose suitable driver.

BTW, maybe my problem was that I tested on my laptop with Windows Vista, and it leads to slow file access (that's why I optimize JLoader and propose one-file-cache mechanism).
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Re: Let's Optimise Joomla!1.5

Post by Physicist » Sat Nov 08, 2008 11:57 am

I just replaced cumulativepatch.zip and patch1.zip (because of left var_dumps in ini.php).
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

seenguyen
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Jan 04, 2007 3:57 pm
Contact:

Re: Let's Optimise Joomla!1.5

Post by seenguyen » Tue Nov 18, 2008 8:52 am

Can your patch be applied to J1.5.8?
See Nguyen

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Re: Let's Optimise Joomla!1.5

Post by Physicist » Tue Nov 18, 2008 9:54 am

There was some changes in languages.php in J!1.5.8 and fixed bug in /components/com_content/views/frontpage/tmpl/default.php.

I attach here patch for J!1.5.8, but don't forget to run /cache.php after applying.
You do not have the required permissions to view the files attached to this post.
Last edited by Physicist on Wed Nov 19, 2008 7:30 am, edited 1 time in total.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

seenguyen
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Jan 04, 2007 3:57 pm
Contact:

Re: Let's Optimise Joomla!1.5

Post by seenguyen » Wed Nov 19, 2008 1:50 am

Thanks Physicist,
I'm going to try!
See Nguyen

seenguyen
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Jan 04, 2007 3:57 pm
Contact:

Re: Let's Optimise Joomla!1.5

Post by seenguyen » Wed Nov 19, 2008 1:55 am

I got these warning:

Code: Select all

environment/request...

Warning: file_get_contents(/libraries/joomla/environment/request.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
version...

Warning: file_get_contents(/libraries/joomla/version.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
base/object...

Warning: file_get_contents(/libraries/joomla/base/object.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
application/application...

Warning: file_get_contents(/libraries/joomla/application/application.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
application/helper...

Warning: file_get_contents(/libraries/joomla/application/helper.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
utilities/utility...

Warning: file_get_contents(/libraries/joomla/utilities/utility.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
filter/filterinput...

Warning: file_get_contents(/libraries/joomla/filter/filterinput.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
html/parameter...

Warning: file_get_contents(/libraries/joomla/html/parameter.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
user/user...

Warning: file_get_contents(/libraries/joomla/user/user.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
filesystem/path...

Warning: file_get_contents(/libraries/joomla/filesystem/path.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
application/component/helper...

Warning: file_get_contents(/libraries/joomla/application/component/helper.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
language/language...

Warning: file_get_contents(/libraries/joomla/language/language.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
filesystem/folder...

Warning: file_get_contents(/libraries/joomla/filesystem/folder.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
plugin/helper...

Warning: file_get_contents(/libraries/joomla/plugin/helper.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
base/observer...

Warning: file_get_contents(/libraries/joomla/base/observer.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
event/event...

Warning: file_get_contents(/libraries/joomla/event/event.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
plugin/plugin...

Warning: file_get_contents(/libraries/joomla/plugin/plugin.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
base/observable...

Warning: file_get_contents(/libraries/joomla/base/observable.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
event/dispatcher...

Warning: file_get_contents(/libraries/joomla/event/dispatcher.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
environment/uri...

Warning: file_get_contents(/libraries/joomla/environment/uri.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
application/router...

Warning: file_get_contents(/libraries/joomla/application/router.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
application/menu...

Warning: file_get_contents(/libraries/joomla/application/menu.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
utilities/simplexml...

Warning: file_get_contents(/libraries/joomla/utilities/simplexml.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
document/renderer...

Warning: file_get_contents(/libraries/joomla/document/renderer.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
environment/response...

Warning: file_get_contents(/libraries/joomla/environment/response.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
application/component/controller...

Warning: file_get_contents(/libraries/joomla/application/component/controller.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
application/component/model...

Warning: file_get_contents(/libraries/joomla/application/component/model.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
application/component/view...

Warning: file_get_contents(/libraries/joomla/application/component/view.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
methods...

Warning: file_get_contents(/libraries/joomla/methods.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
html/html...

Warning: file_get_contents(/libraries/joomla/html/html.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
utilities/string...

Warning: file_get_contents(/libraries/joomla/utilities/string.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
utilities/date...

Warning: file_get_contents(/libraries/joomla/utilities/date.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
application/pathway...

Warning: file_get_contents(/libraries/joomla/application/pathway.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
application/module/helper...

Warning: file_get_contents(/libraries/joomla/application/module/helper.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
user/authorization...

Warning: file_get_contents(/libraries/joomla/user/authorization.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
utilities/arrayhelper...

Warning: file_get_contents(/libraries/joomla/utilities/arrayhelper.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
base/tree...

Warning: file_get_contents(/libraries/joomla/base/tree.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
filter/filteroutput...

Warning: file_get_contents(/libraries/joomla/filter/filteroutput.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/akiadigi/public_html/cache.php on line 8
Did I do something wrong?
I upload, apply the cache.php

I did try many try with Origin J1.5.8 and Updated J1.5.8 from 1.5.7 but there's still the same problem!

Pls advice!
See Nguyen

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Re: Let's Optimise Joomla!1.5

Post by Physicist » Wed Nov 19, 2008 7:32 am

Oops. It was an old variant of cache.php.
I just reupload patch - try it.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)

camppos
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Nov 02, 2006 11:05 pm

Re: Let's Optimise Joomla!1.5

Post by camppos » Fri Nov 21, 2008 8:09 pm

great info

igrik
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Nov 21, 2008 12:06 pm
Location: Latvia
Contact:

Re: Let's Optimise Joomla!1.5

Post by igrik » Sat Nov 22, 2008 10:47 am

There are big problem with your modification.

It works fine, until User is not logged out. Then Cached pages display that user is logged in, but of course there are troubles cause in true user is not already logged in ..

Need to purge some cache after log out. or something like this.

PS: If am logging in with user 2, all profile pages is for user 1..

That is big issue.!
Free Time hobby : Pis.Lv

seenguyen
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Jan 04, 2007 3:57 pm
Contact:

Re: Let's Optimise Joomla!1.5

Post by seenguyen » Wed Nov 26, 2008 5:50 am

Thank Physicist, it's running! I will report after few days for performance!
See Nguyen

seenguyen
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Jan 04, 2007 3:57 pm
Contact:

Re: Let's Optimise Joomla!1.5

Post by seenguyen » Mon Dec 15, 2008 7:31 am

Hi Physicist,

SO I need to enable the System->cache & its plugin?

zorro128
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 153
Joined: Tue Sep 27, 2005 7:27 am
Contact:

Re: Let's Optimise Joomla!1.5

Post by zorro128 » Tue Feb 10, 2009 7:42 pm

I have one question. I am rendering module inside article. This module shows related items for particular content item.

$cache = & JFactory::getCache('mod_related');
$related = &JModuleHelper::getModules( 'related' );
$rendered = $cache->get(array('JModuleHelper','renderModule'),array( $related[0] ));

But problem is that it only renders same content for all articles. How can I distinguish what cache file to use depending on id of article.

scousejohno
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 136
Joined: Mon Oct 13, 2008 10:54 am
Location: Liverpool
Contact:

Re: Let's Optimise Joomla!1.5

Post by scousejohno » Wed May 06, 2009 12:23 pm

two questions i have:

(1) Will this work on 1.5.9
(2) Could anybody comment if this is stable for a large live site with thousands of users

Physicist
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Sat Apr 14, 2007 9:16 am
Location: Russia
Contact:

Re: Let's Optimise Joomla!1.5

Post by Physicist » Wed May 06, 2009 1:57 pm

scousejohno, this topic was created to discuss potential of optimisation of Joomla!1.5. And some points was fairly scafiried by ircmaxell.

The method JRegistryFormatINI::stringToObject is still very slow and should be refactored (maybe using JSON in 1.6 improves situation). But it's slow after applying my patch too.

Caching language files and disabling "System - Debug" plugin are also good idea.

All the other my suggestions give you improvement of the order 0-2%, so you can forget about it.
Denis Ryabov, Lead Developer of Mobile Joomla! extension (https://www.mobilejoomla.com/)


Locked

Return to “Performance - Joomla! 1.5”