Hi,
we want to integrate ezcExecution and I stumbled about a rather time consuming
point in ezcExecution::init():
// Check if the passed classname actually implements the interface. We
// have to do that with reflection here unfortunately since we only
// have the classname and not an object.
$interfaceClass = new ReflectionClass( 'ezcExecutionErrorHandler' );
$handlerClass = new ReflectionClass( $callbackClassName );
if ( !$handlerClass->isSubclassOf( $interfaceClass ) )
{
throw new ezcExecutionWrongClassException( $callbackClassName );
}
So for each and every request we would instantiate two ReflectionClass
objects. I've not done any Benchmark for this, but I assume, that it's an
unnecessary waste of time.
Of course it's fine to have this error during development, but I'd like to
switch this test of for production. If it worked once while testing, then it
works every time as long as I don't change the source code.
So I have a suggestion for the next ezc Releases: Add a "development" and
a "production" mode to ezcBase. Every Component can ask for the current mode
and decide, which tests to do.
Tests that should be skipped in production mode:
A test that depends only on the sourcecode and will pass everytime as long as
the sourcecode remains unchanged, should be skipped.
Maybe you'd like to take speed as a focus for the next release and consider
also #011212: speed up autoload.
http://issues.ez.no/IssueView.php?Id=11212&
Cheers,
--
Thomas Koch
Software Entwickler
--------------------------------
www.billiger-mietwagen.de
TourWerk GmbH
Alter Markt 36-42
50667 Köln
HRB: 7144 (Amtsgericht Freiburg)
Geschäftsführer: Christian Mahnke
Tel. +49221 272 408 18
Fax. +49221 272 408 29
--
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components