Re: [PHP] Re: Does class length slow down performance
On Sat, Jul 24, 2010 at 5:57 AM, Nathan Rixham wrote: > If you think about it, each class, function, method, line of code all gets > interpreted in to opcodes and executed - so, no matter how you split it up, > it's still going to produce roughly equivalent opcodes. > An exception to this is when you have a class that can be heavily refactored. For example, say you have a data access class that operates on books in the database (standard CRUD) and also generates XML and JSON views of the books. If you refactor the class to extract the XML and JSON export into separate classes--something that should be done for many other reasons--you won't have to load and parse that code when you're not exporting the data. David
[PHP] Re: Does class length slow down performance
Sebastian Ewert wrote: Hi, I'm developing an joomla component and my helper an user classes are crowing bigger and bigger. The helper class is for static use only. Does class size decrease performance of my php scripts, even for static usage? Is there a general rule when to split a class to keep performance up? If you think about it, each class, function, method, line of code all gets interpreted in to opcodes and executed - so, no matter how you split it up, it's still going to produce roughly equivalent opcodes. Thus, no. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php