Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113972 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16242 invoked from network); 5 Apr 2021 22:06:11 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 5 Apr 2021 22:06:11 -0000 To: internals@lists.php.net References: Date: Mon, 5 Apr 2021 23:05:02 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Posted-By: 87.81.129.66 Subject: Re: [RFC] Autoloader Classmap From: marandall@php.net (Mark Randall) Message-ID: On 15/03/2021 17:41, Mark Randall wrote: > I would like to propose the addition of a new mechanism of autoloading > classes - a classmap that will be consulted prior to checking the > spl_autoload_register'd callbacks. > > https://wiki.php.net/rfc/autoload_classmap Does anyone else have any more feedback on this? If not I plan on opening voting in a couple of weeks or so. The tl;dr: * Autoloading is one of the routines called most frequently in any request. * It's a very minor boost in autoloading performance, around 5% vs invoking a userland function. This will easily be swamped by any IO and invalidated entirely by preloading. * I expect 99.9999% of users will never know it exists, and it will instead just be an option for tools like composer that will provide a small transparent boost. * It provides a very minor benefit to debugging as you get to skip over the autoloading frames which so very often come up during a request.