Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 1:11 pm (All times are UTC )

 


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.



Post new topic Reply to topic  [ 13 posts ] 
Author Message
Posted: Fri Feb 01, 2008 3:05 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 04, 2005 12:07 am
Posts: 15
I work for a company that builds Joomla! based websites for our clients.
We install Joomla!, configure it and install any 3rd party components necessary, build templates for the client, insert some content, and build any new extensions etc they might need.

So once Joomla! 1.5 was finally released it was my job, as the technical manager,  to review and evaluate it.

From a purely technical standpoint I found some things that are a bit of a concern.

I did a comparison in the following way. I installed a clean Joomla! 1.0.13 and Joomla! 1.5.0 installs on seperate sites on a local development server running PHP 5.2.
I turned on debugging on both and then added code to both so that on each page it would display the following, if the debugging did not already display it.
- Memory usage
- Load times
- Files loaded
- Queries run

I then very simply just loaded the same pages in both Joomla! 1.0 and Joomla! 1.5 and compared the different values.
In the final results I have left the number of queries out because while there were minor variations in some cases the number of queries being run was not significantly different enough to warrant notice.

What I found was that in almost every single case Joomla! 1.5 is using 1+Mb more memory, loading 10 - 20+ more files and is at least 3 - 10 times slower to execute than Joomla! 1.0

Here are some of the statistics that I gathered.
The Admin control panel in Joomla! 1.0 loads in 0.0165 seconds, uses 2.9Mb of memory and loads 37 files.
The Admin control panel in Joomla! 1.5 loads in 0.107 seconds, uses 4.5Mb of memory and loads 89 files.
That makes the Joomla! 1.5 control panel 7 times slower, using almost twice the memory and over twice the number of code files loaded.

I tested a few other admin pages as comparisons as well and while the differences were not as pronounced they were still in the ranges indicated above, i.e. 1+Mb memory, 10-20+ more files and 7 - 10 times slower.

The front end shows some big differences as well.
Now admittedly there are a few (3 or 4) more modules displayed on the default Joomla! 1.5 homepage than there is on the Joomla! 1.0 but here is what was found.
The Joomla! 1.0 homepage loads in 0.087 seconds, used 3.8Mb of memory and uses just 44 files.
The Joomla! 1.5 homepage loads in 0.228 seconds, uses 6.1Mb of memory and uses an amazing 153 files.
The makes Joomla! 1.5 front page nearly 3 times slower, using almost twice the memory and over 3 times the number of code files loaded

Again similar tests of standard front end functionality such as viewing content items and the contact page shows that Joomla! 1.5 uses 1+Mb more memory, loading 100+ files and is 3+ times slower to execute.

I am just putting this out there as constructive criticism. I think the Joomla! developers should look into this and see if there are any optimisations they can implement in future versions to regain some of the previous performance. I understand that websites such as joomlaperformance.com give tips on how to optimize Joomla!, but in general they do not talk about the fact that the Core Joomla! itself may not be as optimized as it could be.

Joomla! 1.5 certainly looks good and some of the new features are nice, but the performance hits could be a concern if a site needs to host a lot of traffic or is being hosted on an already overloaded hosting server.

_________________
http://www.sm2joomla.com/ SM2 Joomla Components
http://www.sm2.com.au/ SM2 - technology | creative | strategy
Getting the web to work for you.


Top
  E-mail  
 
Posted: Fri Feb 01, 2008 11:01 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Wed Sep 26, 2007 10:59 am
Posts: 95
I totally agree with you, Joomla 1.5 should get some performance review (maybe even a "Joomla performance" workgroup), I already posted some suggestions (Profiling J1.5 and Adding indexes to J1.5), but I don't think anyone noticed. On my production box with caching && opcode cache (eAccelerator) the frontpage needs around 6MB's and 0.2sec, that's just WAY too much and I don't know how it will handle load (this is a test installation, the same box is running J1.0 fine).

As a sidenote, a test installation of phpBB3 with around 100k posts loads its frontpage in 0.05sec on the same box but they take great care of their queries and take performance seriously. I hope this post of mine doesn't get interpreted as trolling, you guys did a great job with J1.5 framework but it really needs some optimization work. Cheers.


Top
  E-mail  
 
Posted: Fri Feb 01, 2008 1:47 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso
Offline

Joined: Fri Sep 16, 2005 8:41 pm
Posts: 3652
Location: NRW - Germany
Hi tonanbarbarian,
thank you for this evaluation, however, could you please do me the favour and note where you got the numbers from and explain your testing environment a bit more?

The problem is that for example the execution time of Joomla 1.0 is just plainly wrong. The time that is returned when switching on debugging is just the time it takes to execute the component, nothing else. So no module, framework loading, etc. is in this time calculation. To get a good estimate, you would have to add a new timecalculation to 1.0.

The next thing is the rest of the installation: It seems as if you just compared the standard installations of 1.0 and 1.5, each time with the sample data. This is not really good for comparison, since they are both completely different. It would be more interesting to have a template for 1.0, modify it for 1.5 and then load both with that template and the same modules and articles. That would be a good basis for comparison.

Last but not least: It would be interesting to see the comparison with caching switched to on.

Oh, I almost forgot: The php version would be interesting, too. PHP 5.2 is faster than 4.3 and 1.5 should profit from this more than 1.0

With that said, I think your asessment of the situation currently is not objective.

@dkarlovi
I've read your thread about the DB optimizations before. I don't feel confident enough to decide anything in this area, however I think the issue why it wasn't taken up allready, is the problem of changing the database, which is always a bad thing and we try to prevent any changes in this area. I will bring this up with the others in the team and we will see if we can improve us here or if we maybe can give some sort of documentation on how to do this for some special installation.

All this said, we know that Joomla has potential to improve in the area of performance. Our problem is the backwards compatibility and a lot of old code, which we have to drag along. 1.5 was a good way to get the whole framework on a new quality level. Now we need to slowly get rid of old code and old schemes like the section/category system and move to more flexible and more performant systems. I can only encourage you to take part in the planning of 1.6 and the following versions when we are calling for the whitepapers. See Wilcos blog entry here: http://www.joomla.org/component/option, ... 105/p,482/

Hannes

_________________
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.

Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.


Top
   
 
Posted: Fri Feb 01, 2008 2:22 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Wed Sep 26, 2007 10:59 am
Posts: 95
Hackwar wrote:
I've read your thread about the DB optimizations before. I don't feel confident enough to decide anything in this area, however I think the issue why it wasn't taken up allready, is the problem of changing the database, which is always a bad thing and we try to prevent any changes in this area.


Indexes aren't really changing the DB scheme, it's like you have a book and an Table of Content in front of it. If you rip out the TOC, the book stays the same, the only thing is you can't find anything using TOC (because it'd not there anymore). I understand that changing the DB is a bad thing, but adding or changing indexes can only change the way data is looked up in the DB and the performance of that operation, nothing more, nothing less. This is the safest DB change you can have. :)

Quote:
I will bring this up with the others in the team and we will see if we can improve us here or if we maybe can give some sort of documentation on how to do this for some special installation.


This would be great indeed. I could write a short tutorial how to catch the offenders. :)

Quote:
I can only encourage you to take part in the planning of 1.6 and the following versions when we are calling for the whitepapers. See Wilcos blog entry here: http://www.joomla.org/component/option, ... 105/p,482/


That's fine, I'll do my best. But the key to optimization is not to do it as a feature but to do it after the features have settled, you can't really optimize a moving target. So, Joomla 1.5 should get optimizations... well, now.  :D


Top
  E-mail  
 
Posted: Fri Feb 01, 2008 2:54 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Aug 12, 2005 7:50 pm
Posts: 182
Location: New York City
dkarlovi wrote:
Indexes aren't really changing the DB scheme, it's like you have a book and an Table of Content in front of it. If you rip out the TOC, the book stays the same, the only thing is you can't find anything using TOC (because it'd not there anymore). I understand that changing the DB is a bad thing, but adding or changing indexes can only change the way data is looked up in the DB and the performance of that operation, nothing more, nothing less. This is the safest DB change you can have. :)


I felt the exact same way until I thought about where Joomla was deployed. There are a LOT of Joomla sites being hosted on underpowered, overloaded shared systems. And in those cases those indexes actually cause more load than good. Another scenario is a typical corporate site that only has 10 pages or so. What good are indexes on tables that never have more than 10 rows? ;)

So for more than 50% of the existing sites, I would bet that additional indexes would only provide a slowdown, not a speedup.

What I'd like to see, however, is a separately maintained SQL script that more demanding sites could run that provided the indexes that would keep the slow query log from filling up. Hannes provided one at one time IIRC, and you sound like you provided one as well. Why not fire up a project on the forge for a separately-maintained script for database-intensive sites that could use the additional optimization?

Also, when regarding performance, you have to remember that 1.5 is purely based on objects, and uses a lot of patterns - these things mean doing the "same thing" requires a lot more class includes and method execution. I don't think it is rational to expect 1.5 to ever reach 1.0 performance based on that simple premise, but I'd love to be proven wrong on that one *grin*

I definitely think caching is an area of major improvement in 1.5, as there's a lot of things we could do to make caching more efficient. It's still better than what we did for 1.0, but still has a long way to go.

_________________
Bringing on that Spacemonkey goodness:
website -> www.spacemonkeylabs.com
blog -> www.mitchitized.com


Top
  E-mail  
 
Posted: Fri Feb 01, 2008 3:46 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Wed Sep 26, 2007 10:59 am
Posts: 95
spacemonkey wrote:
I felt the exact same way until I thought about where Joomla was deployed. There are a LOT of Joomla sites being hosted on underpowered, overloaded shared systems. And in those cases those indexes actually cause more load than good.


Not sure what you mean here. Sequential scan is faster than index lookup if you have a very small data set and your index has many permutations (thus, it's actually bigger then the table), but the difference shouldn't be all that much. No index when index is needed is far worse then index when none is needed.  :)

Quote:
Another scenario is a typical corporate site that only has 10 pages or so. What good are indexes on tables that never have more than 10 rows? ;)


Small dataset - small index, thus it cannot hurt.

Quote:
So for more than 50% of the existing sites, I would bet that additional indexes would only provide a slowdown, not a speedup.


How did you get this percent? :pop

Quote:
Also, when regarding performance, you have to remember that 1.5 is purely based on objects, and uses a lot of patterns - these things mean doing the "same thing" requires a lot more class includes and method execution. I don't think it is rational to expect 1.5 to ever reach 1.0 performance based on that simple premise, but I'd love to be proven wrong on that one *grin*


Sure, I get it, very complex architecture means more resources, but it can (and must) be resolved by caching, which now it doesn't really (judging by the fact we're having this conversation).  ;)


Top
  E-mail  
 
Posted: Fri Feb 01, 2008 5:18 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Aug 12, 2005 7:50 pm
Posts: 182
Location: New York City
@dkarlovi: Indexes slow down all CRUD operations (create, replace, update, delete) so the more indexes you have, the slower your CRUD ops are. On fast machines that are tuned, that is not so significant, but on the abovementioned overloaded shared machines, that really hurts, and hurts more than you'd normally expect. Add mysql's silly MyISAM as default storage, and you got table locks going on everywhere because the CRUD ops are blocking all SELECT statements, thanks to MyISAM's inability to do locks at the row level. Yeowch.

I'm totally in agreement with you that caching needs a lot of work in the 1.5 series. Caching in 1.0 was done more like a proof-of-concept (hey lookit that, I cached something!) so it's only natural that 1.5 take further steps down that evolutionary path.

_________________
Bringing on that Spacemonkey goodness:
website -> www.spacemonkeylabs.com
blog -> www.mitchitized.com


Top
  E-mail  
 
Posted: Fri Feb 01, 2008 6:03 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Wed Sep 26, 2007 10:59 am
Posts: 95
spacemonkey wrote:
@dkarlovi: Indexes slow down all CRUD operations (create, replace, update, delete) so the more indexes you have, the slower your CRUD ops are. On fast machines that are tuned, that is not so significant, but on the abovementioned overloaded shared machines, that really hurts, and hurts more than you'd normally expect.


CRUD stands for Create, Read, Update, Delete so I don't think indexes slow down all of it.  ;D It's obvious that changing the dataset is going to need index rebuild but that shouldn't affect performance to the effect you describe, it's a corner case at best and should be treated as such.

Quote:
Add mysql's silly MyISAM as default storage, and you got table locks going on everywhere because the CRUD ops are blocking all SELECT statements, thanks to MyISAM's inability to do locks at the row level. Yeowch.


No argument there, MySQL is basically a toy, but it's the toy Joomla chose so we all play with it. Here's a quote from MySQL's Explain doc page:

Join type: ALL

A full table scan is done for each combination of rows from the previous tables. This is normally not good if the table is the first table not marked const, and usually very bad in all other cases. Normally, you can avoid ALL by adding indexes that allow row retrieval from the table based on constant values or column values from earlier tables.


Now take this Joomla query, I've taken it from my slow.log:

Code:
mysql> explain SELECT a.id, a.title, a.title_alias, a.introtext, a.fulltext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by, a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.images, a.attribs, a.urls, a.metakey, a.metadesc, a.access, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug, CHAR_LENGTH( a.`fulltext` ) AS readmore, u.name AS author, u.usertype, g.name AS groups, cc.title AS category, s.title AS section, s.ordering AS s_ordering, cc.ordering AS cc_ordering, a.ordering AS a_ordering, f.ordering AS f_ordering FROM jos_content AS a INNER JOIN jos_content_frontpage AS f ON f.content_id = a.id LEFT JOIN jos_categories AS cc ON cc.id = a.catid LEFT JOIN jos_sections AS s ON s.id = a.sectionid LEFT JOIN jos_users AS u ON u.id = a.created_by LEFT JOIN jos_groups AS g ON a.access = g.id WHERE 1 AND a.access <= 0 AND a.state = 1 AND (( cc.published = 1 AND s.published = 1 ) OR ( a.catid = 0 AND a.sectionid = 0 ) ) AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2008-02-01 15:19:28' ) AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2008-02-01 15:19:28' ) ORDER BY  f.ordering;
+----+-------------+-------+--------+----------------------------------------------------+---------+---------+---------------------+------+----------------+
| id | select_type | table | type   | possible_keys                                      | key     | key_len | ref                 | rows | Extra          |
+----+-------------+-------+--------+----------------------------------------------------+---------+---------+---------------------+------+----------------+
|  1 | SIMPLE      | f     | ALL    | PRIMARY                                            | NULL    | NULL    | NULL                | 1774 | Using filesort |
|  1 | SIMPLE      | a     | eq_ref | PRIMARY,idx_section,idx_access,idx_state,idx_catid | PRIMARY | 4       | area51.f.content_id |    1 | Using where    |
|  1 | SIMPLE      | cc    | eq_ref | PRIMARY                                            | PRIMARY | 4       | area51.a.catid      |    1 | Using where    |
|  1 | SIMPLE      | s     | eq_ref | PRIMARY                                            | PRIMARY | 4       | area51.a.sectionid  |    1 | Using where    |
|  1 | SIMPLE      | u     | eq_ref | PRIMARY                                            | PRIMARY | 4       | area51.a.created_by |    1 |                |
|  1 | SIMPLE      | g     | eq_ref | PRIMARY                                            | PRIMARY | 1       | area51.a.access     |    1 |                |
+----+-------------+-------+--------+----------------------------------------------------+---------+---------+---------------------+------+----------------+


in my slow.log, there's also this:

Code:
# Query_time: 6  Lock_time: 0  Rows_sent: 1735  Rows_examined: 12251


So, this query took six seconds to examine 12251-row dataset and return 1735 rows which I doubt it uses. If you take a look at the first row of the explanation, you'll see that it in fact lacks an index. This query is from com_content executed from the frontpage. So, what I'm saying is, in general, indexes are better then no indexes.

Try it yourself, turn off MySQL query cache and do a select on a non-indexed field with ten rows, add an index and do the select again, it shouldn't make a real big difference, it could be couple msec either way. Now, do the same thing with 100k rows, you should really see the difference. Anyway, if you're interested, I would suggest MySQL performance blog, a really great read for things like this

Somewhat related, this:

Code:
for ($x 0$x count($array); $x++){
// do something with $x


What people don't understand is that in this example count($array) is executed every time, not just the first one as one would imagine, and count() is costly.


Top
  E-mail  
 
Posted: Fri Feb 01, 2008 10:45 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 04, 2005 12:07 am
Posts: 15
Ok here is some more information about the testing I did.

For the time values I received here is what I did.

In Joomla! 1.5 I simply switched on debugging. This gives you the execution times. However I will note there is a discrepancy here, which I did not want to mention earlier. That is because it makes Joomla! 1.5 look even worse. This is the fact that the benchmark timing used in Joomla! 1.5 is started after several other things are processed. There is some housekeeping done first that cleans up global data etc before the benchmark timer is started. I tried to add my own independent timer originally but had to start it after the globals were cleaned up otherwise it was deleted alone with all other global values. So this means that in J1.5 the times reported are actually a fraction of a second too short, and there is no real easy way to determine how much extra time is used.

In Joomla! 1.0 I edited the index.php file in the front end and the index2.php files in the back end and added a get_mirctotime type of function and then captured the start time. In both cases I did this immediately after the _VALID_MOS definition.
Then as the very last thing done on the index.php page I grabbed the time again and calculated the difference.
This is a very accurate way of determining the time.

Now I realise that to make the tests completely fair I should have used the same method to determine the execution time in both, but as I indicated I could not use the same method in J1.5 because of the global cleanup code.

To determine the memory usage in Joomla! 1.5 I used the debugging again.
In Joomla! 1.0 at the end of the index.php file I added a get_memory_usage and echoed that out to the screen.

To determine the number of files in both Joomla! 1.5 and Joomla! 1.0 I added the following to the end of each index.php script
Code:
echo '<pre>'.print_r(get_included_files(), true).'</pre>';

This displayed all of the files loaded. Was a simple matter to then look at the last index in the array and add 1 to get the total number of files loaded.

Now I admitted in my original post that in the front end there are more modules in Joomla! 1.5 than in Joomla! 1.0 so that those values would show greater difference, however the information displayed in the administration control panel is mostly the same, and yet there is still that large difference between the values.

I did not do the tests with caching on, because that would not show me the performance of the core of Joomla! 1.5.
Yes caching is important and can dramatically improve performance, as can some of the various database optimisations that have been proposed, however I did not want to see how fast Joomla! could retrieve a page from the cache, but how fast it did its every day normal tasks.

And finally as I stated in my original post I used PHP 5.2 as the test. I could have tried it in PHP 4 as well but decided not to. So I guess I was running Joomla! 1.5 as fast as it could.

My post was not meant to be a criticism, it was put out there to let you know, if you did not already, that Joomla! 1.5 is slower and more resource intensive than Joomla! 1.0. I realise that part of this is due to Joomla! 1.0 compatibility.

I look forward to the future of Joomla! 1.5 and seeing it performing as well if not better than it ever did.

_________________
http://www.sm2joomla.com/ SM2 Joomla Components
http://www.sm2.com.au/ SM2 - technology | creative | strategy
Getting the web to work for you.


Top
  E-mail  
 
Posted: Mon Feb 04, 2008 3:55 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Nov 10, 2005 3:10 am
Posts: 1919
Location: New Jersey, USA
One thing we have been looking at is the aparant high memory usage of the 1.5 front end.  Initial indications are that this appears to be php version dependant.  I have a 1.5 live site running on 1.2 meg ram MAX (php 5.2.2)...  However, some users have upwards of 10 megs (php 5.0.x, and 4.4.7 that I know of). 

As for Indexes, they are in the works.

Also, MySQL is NOT a toy.  It powers some HUGE mission critical databases.  MyISAM IS a toy however for any kind of performance (except for REALLY read heavy apps_.

Count() is not costly.  It's not necessarily good, but it's not expensive.  I would choose a few other things in the core that I would complain about (performance wise) LONG before count() being used in a for loop...

Is Joomla 1.5 slower and more resource intensive?  Well, kinda.  The whole point of 1.5 is to build a framework so 3pd extensions become much simpler, AND more powerful.  In order to get a good idea of performance with 1.5, you'd need to benchmark full blown websites, not default installs... 

As far as having people involved interested in performance, I can tell you this, there are at least a few of us involved who are VERY interested in performance...

_________________
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


Top
   
 
Posted: Mon Feb 04, 2008 9:41 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Wed Sep 26, 2007 10:59 am
Posts: 95
ircmaxell wrote:
One thing we have been looking at is the aparant high memory usage of the 1.5 front end.  Initial indications are that this appears to be php version dependant.  I have a 1.5 live site running on 1.2 meg ram MAX (php 5.2.2)...  However, some users have upwards of 10 megs (php 5.0.x, and 4.4.7 that I know of).


I've noticed this (on my local machine it would use about 1.5MB, on my test installation up to 7MB, both running PHP 5.2) but couldn't figure out what was that all about.

Quote:
As for Indexes, they are in the works.


Great to hear.

Quote:
Also, MySQL is NOT a toy.  It powers some HUGE mission critical databases.  MyISAM IS a toy however for any kind of performance (except for REALLY read heavy apps_.


I know about MySQL usage, what I meant was "one index per query" or the lacking EXPLAIN support (compare it to PostgreSQL's).

Quote:
Count() is not costly.  It's not necessarily good, but it's not expensive.  I would choose a few other things in the core that I would complain about (performance wise) LONG before count() being used in a for loop...


This was just an example, with longer arrays it's execution time would go up exponentially. These are some nice hints.  :) Could you list you pet peeves?

Quote:
Is Joomla 1.5 slower and more resource intensive?  Well, kinda.  The whole point of 1.5 is to build a framework so 3pd extensions become much simpler, AND more powerful.  In order to get a good idea of performance with 1.5, you'd need to benchmark full blown websites, not default installs... 


I'm testing on a site migrated from 1.0 so it is a full blown site.

Quote:
As far as having people involved interested in performance, I can tell you this, there are at least a few of us involved who are VERY interested in performance...


Also great to hear, this would make the "Performance workgroup" idea possible.


Top
  E-mail  
 
Posted: Mon Feb 04, 2008 2:54 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Nov 10, 2005 3:10 am
Posts: 1919
Location: New Jersey, USA
dkarlovi wrote:
This was just an example, with longer arrays it's execution time would go up exponentially. These are some nice hints.  :) Could you list you pet peeves?

Hmmm... That's an interesting article...

The only complaint I have there, is that most of those items have miniscule/neglegable gains.  I'm surprised not to see some things in there such as:
preg vs ereg (preg is MANY times faster for the same regex, and we know how slow regex can be)
glue vs full stack for frameworks (Glue loads what you need (as J does), where as fullstack loads everything)

A few points of contention
Quote:
This only works with echo, which is a function that can take several strings as arguments.
Echo is a language construct, not a function...

Quote:
A PHP script will be served at least 2-10 times slower than a static HTML page by Apache. Try to use more static HTML pages and fewer scripts.
Apache and performance should not be in the same sentance.  Check out a REAL performance webserver such as Lighttpd

Quote:
Surrounding your string by ' instead of " will make things interpret a little faster since php looks for variables inside "..." but not inside '...'.
I did some testing on this, and found that for short strings (< 10 chars), " is faster.  For medium length strings (< 1000 chars), ' is faster, and for long strings, they are about the same.  Note, that when one is faster, it's by MAYBE 0.5 %...

He repeats him self quite a bit in that article... Echo is in there at least 3 times, he talks about mod_deflate, then mod_gzip, he says "don't split code too much", then the next one is "split it later if needed"...

All in all, decent stuff, but like I said, VERY minor gains for most of what's suggested there...

_________________
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


Top
   
 
Posted: Tue Feb 05, 2008 12:26 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Wed Sep 26, 2007 10:59 am
Posts: 95
ircmaxell wrote:
dkarlovi wrote:
This was just an example, with longer arrays it's execution time would go up exponentially. These are some nice hints.  :) Could you list you pet peeves?

Hmmm... That's an interesting article...


Yes, and I was trying to point out my "no count() in for loops" which was also just an example, I found those issues just by profiling Joomla requests. My point was that the devel team should do that too and find bottlenecks.

Quote:
All in all, decent stuff, but like I said, VERY minor gains for most of what's suggested there...


But then again, you have to use one or the other, why not use the one which you know will result in faster code?  :)

Anyway, you haven't mentioned some framework issues you have with it, I'd love to look at those, maybe even some patches are in order (at least for my own site).


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group