[Solar-talk] Performance ideas

Paul M Jones pmjones at ciaweb.net
Tue Oct 16 18:14:10 CDT 2007


On Oct 16, 2007, at 3:11 PM, Richard Thomas wrote:

> 1. Again calling from my exp looking at ZF and assuming you do some of
> the same things there are a ton of class_exists, file_exists and other
> checks that in production are not really usefull at all.

They are when we get to things like falling back through a directory  
structure to find the parent helpers, locales, views, layouts, etc.   
In theory, we should be able to cache the "found" file for all those,  
but I think that's an optimization that will take a lot of time with  
little effect.  My bet (unproven) is that there will be plenty of  
ways to speed up a Solar-based application that will have greater  
reward for less effort, like caching DB calls, etc.


> 2. It would have to be transparent.. If not defined it should still
> work, matter fact if someone didn't define hints it would skip them so
> it shouldn't affect peformance and more then a single boolean if
> statement.

That part is not hard; at Solar::start() time ...

     if ! defined('SOLAR_DEBUG') define ('SOLAR_DEBUG', true);

... but I'm not sold on that idea quite yet.


--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.  <http://solarphp.com>

Join the Solar community wiki!  <http://solarphp.org>

Savant: The simple, elegant, and powerful solution for
templates in PHP.  <http://phpsavant.com>




More information about the Solar-talk mailing list