Re: Re: Does class length slow down performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 24, 2010 at 5:57 AM, Nathan Rixham <nrixham@xxxxxxxxx> 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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux