Login   Register  
PHP Classes
elePHPant
Icontem

Performance

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      PHP Classes blog  >  Why is it better to d...  >  All threads  >  Performance  >  (Un) Subscribe thread alerts  
Subject:Performance
Summary:Clases OOP are poor performance vs not OOP
Messages:5
Author:José Antonio Nóbile R.
Date:2012-03-21 15:25:52
Update:2012-03-23 15:18:25
 

  1. Performance   Reply  
Picture of José Antonio Nóbile R.
José Antonio Nóbile R.
2012-03-21 15:28:44
The classes add a bit of load of memory and CPU usage.

  2. Re: Performance   Reply  
Picture of Manuel Lemos
Manuel Lemos
2012-03-21 15:30:43 - In reply to message 1 from José Antonio Nóbile R.
Yes, but that rarely is noticeable when compared to other factors like database access performance and memory usage. I just explain that in another reply:

http://www.phpclasses.org/discuss/blog/PHP-Classes-blog/post ...

  3. Re: Performance   Reply  
Picture of José Antonio Nóbile R.
José Antonio Nóbile R.
2012-03-21 23:05:10 - In reply to message 2 from Manuel Lemos
I did many test using PEAR DB getting rows of MySQL.

BY example, the some query, server, load, results (100K rows)

PEAR DB: 30s
Only mysql_connect, mysql_query while(mysql_fetch_assoc) 2s

I write a simple class for manage transactions, queries, open and close database, and the time was 2.5s


  4. Re: Performance   Reply  
Picture of Manuel Lemos
Manuel Lemos
2012-03-22 00:05:50 - In reply to message 3 from José Antonio Nóbile R.
Right, when you amplify small differences of execution times by 100.000 the differences become noticeable.

However, what I mean is that retrieving a large number of query result rows is not a common case. It may happen but it is not the normal case.

  5. Re: Performance   Reply  
Picture of KernelFolla
KernelFolla
2012-03-23 15:18:25 - In reply to message 1 from José Antonio Nóbile R.
You can always go back and develop assembly;) but i don't think that today the first problem is permformance.
Developers have understood that it is better to build objects from the mid-90, the reasons should be obvious.