Req #72224 [Opn->Fbk]: Optimize reflection initialization

From: Date: Fri, 20 May 2016 19:29:36 +0000
Subject: Req #72224 [Opn->Fbk]: Optimize reflection initialization
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201210@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72224&edit=1 ID: 72224 Updated by: krakjoe@php.net Reported by: dmri87 at hotmail dot com Summary: Optimize reflection initialization -Status: Open +Status: Feedback Type: Feature/Change Request Package: Reflection related PHP Version: 7.0.7RC1 Block user comment: N Private report: N New Comment: I've flicked through the source code of the most common reflector constructors, and I see nothing that is obviously causing such problems. Can you provide some example code that behaves extra ordinarily, perhaps that will help me to understand better ? Previous Comments: ------------------------------------------------------------------------ [2016-05-16 14:18:20] dmri87 at hotmail dot com Description: ------------ PHP should improve the creation of Reflection objects. Almost literally any library or framework using Reflection non trivially I've encountered implements its own Reflection objects caching mechanism. That because creating such objects is incredibly expensive and it's way more expensive than caching them all, even if thousands of them. I had to do the same to keep performance acceptable. PHP should do this internally if possible, or try to optimize something, because again, the amount of times I've seen this is incredible and it's a clear sign the creation of such object is just too slow. Just to be clear (sorry if I sound harsh but I actually just want to be clear) Reflection object's creation performance is a problem even for those that are using it trivially. I don't think it's acceptable if the creation of few dozens of these objects turns out to be an important bottleneck for applications that would otherwise be extremely fast. Thank you for reading and double thank you if you intend to work on this. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72224&edit=1

« previous php.bugs (#201210) next »