Lukas Kahwe Smith wrote:
Can we get this patch to release quality by this weekend?
So that people can test it on Monday/Tuesday ahead of RC1?

I don't see this being a problem, I do have a few items I'd like to point out 
for feedback/suggestions:

1) Currently it doesn't support method level lazy loading, it's probably 
advisable to wait and include this later, but if everyone thinks it's 
significant enough we could probably add support for that.  I'm not sure on all 
the details this involves, perhaps someone familiar with method calls could 
suggest difficulty and/or optimized ways to do the lookups.

2) Currently I've inserted these hook calls into everywhere we call/lookup 
classes.  This has the downside that any extension wanting to mess with the 
function table, lookup entries, etc will need to be aware of the callback 
hooks.  I think a better architecture is to create an API for function table 
and class table operations.  Perhaps this could be done later if we want this 
likely more stable version in 5.3, and perhaps I'm overstating the significance 
of other functions doing these sort of things and not being aware of this new 
feature.  (I believe dmitry mentions several extenions that need changes to 
support this).  On the upside not creating an API means existing code will 
still work if they don't use lazy loading. ;-)

3) The largest portion of time currently is simply adding dummy entries to the 
lazy hash tables so we can detect name collisions and availability, my next 
goal is to improve the performance of this by either creating a faster copy of 
the entries or determine some better method of performing lookups/marking 
functions as available (something like lookups directly into the APC shared 
memory segment).  Just putting this out there in case anyone has some 
interesting suggestions.


I think all the above 3 items don't necessarily need to be done to have this 
work in 5.3 (and #3 is pretty much APC/opcode cache centric) and might cause 
unecessary complication for an initial support of this, but what does everyone 
else think?



Regarding a couple of Dmitry's suggestions:

1) I would prefer to add additional hash_value argument into 
lookup_function_hook() and lookup_class_hook to prevent multiple calculation.

I'm upset I didn't do that in the first place ;-)

2) function_exists() should use lookup_function_hook().
3) interface_exists() and class_alias() should use lookup_class_hook().

I'm pretty sure I already have support for this, it may have been lost while 
porting it over, I'll double check.


I'll follow up with Dmitry on getting these and any other items taken care of, 
thanks!

-shire



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

Reply via email to