Lukas Kahwe Smith wrote:
> On 21.01.2009, at 12:00, Karsten Dambekalns wrote:
> 
>> On 21.01.2009 11:44 Uhr, Kenan R Sulayman wrote:
>>> I did propose the function because the construction in user-land is
>>> quite
>>> expensive;
>>
>> Reflection is expensive, indeed. The way we solved it for FLOW3 is to
>> create a ReflectionService that caches such information as long as the
>> source doesn't change.
> 
> yeah its a general problem .. but so far the decision has been that we
> should move away from adding more and more functions/methods for highly
> specialized cases (as in not continue in the get_class() etc. approach).
> now speeding up reflections is a very real issue .. suggestions in this
> regard are quite welcome. maybe offering a cache service as part of core
> is one approach ..

Yes, please. Keep clutter out of the engine especially for stuff which
should not be used often. If you are relying on Reflection to be fast
for you everyday code then you're IMHO doing something weird and it is
ok that you have to write your own caching for it (-:C

Keep it simple, make the common case fast, make other things possible,
- Chris

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to