[Solar-talk] Namespacing with concrete class functionality (was: Re: Proposal: Remove namespace to Solar::loadClass()/factory())

Travis Swicegood development at domain51.com
Wed Nov 8 10:02:14 PST 2006


Howdy all,

Rodrigo Moraes wrote:
> Hey,
> I've done some benchmarks. I'm not sure if these is a correct
> benchmark, but it seems that there is a bad performance penalty (about
> 30% slower) when your Vendor is the primary namespace and you don't
> have many class replacements in your vendor.


I finally had a chance to run some benchmarks this morning.  I used ab 
to hit my local machine.  I was testing 100 concurrent connections for 
two minutes.  The straight namespaces/noNamespaces files are run against 
the bookmarks app's default page.  The loadClass-sql-* files were calls 
that did a straight start() followed by a 
loadClass('Sql')/loadClass('Solar_Sql') while the bookmarks-* files are 
against index.php/bookmarks.  These are all with a namespaces array of 
Solar, Domain51.

Using the simplest form - loading a single class, it looks like there's 
a 5% hit in performance.  Using the bookmarks app, it looks like there 
was a 13% hit.  This just proves foreach() hurts anyway you shake it.  
I'm try some tweaks and see if I can get it better performance out of 
this.  If I can keep both under 5%, I'd be happy.

-Travis
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: loadClass-sql-noNamespaces
Url: http://mail.killersoft.com/pipermail/solar-talk/attachments/20061108/4c69bf9a/attachment.diff 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: loadClass-sql-original
Url: http://mail.killersoft.com/pipermail/solar-talk/attachments/20061108/4c69bf9a/attachment-0001.diff 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bookmarks-namespaces
Url: http://mail.killersoft.com/pipermail/solar-talk/attachments/20061108/4c69bf9a/attachment-0002.diff 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bookmarks-original
Url: http://mail.killersoft.com/pipermail/solar-talk/attachments/20061108/4c69bf9a/attachment-0003.diff 


More information about the solar-talk mailing list