Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113980 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 3063 invoked from network); 6 Apr 2021 18:03:41 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Apr 2021 18:03:41 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4B8D21804B3 for ; Tue, 6 Apr 2021 11:02:46 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 6 Apr 2021 11:02:43 -0700 (PDT) Received: by mail-lf1-f51.google.com with SMTP id w28so24114394lfn.2 for ; Tue, 06 Apr 2021 11:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=T8HtAWZu+ijHjlVo0fHUgGTDFTdYXpCboTOEAm98yeo=; b=VN3BmO5X2WBD7h8Q0jjHjnTOh65TypzxoOlK+dyGt4srCM7hWjMeeJ8UqmKrnWNAuU GD0VR3jZKGHTw/sXXHf0zAD5cDdyDCXgd+KAhVecOvK8RjmLZ2Jbkv2Wi83MR7vPgr/D E05G4QXE0MpU3V3KAVmpOzcdj/X3TIbtQZd40DKQvMHewYJjr9MjcTJeizOo1ehvwob2 +sUI6qrJ3+z9cNxCTI3HTZoS7IvZaag8LH4igS75ZyYNZ528lT70LZ/lA87Rhjf22fGh fz7Qoe7d8nH+6KhOzYmzKfek03l0+o3nlubKLlr+gEyjGW7d6F1+rxKADmJILlaukPMX +gug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T8HtAWZu+ijHjlVo0fHUgGTDFTdYXpCboTOEAm98yeo=; b=PyyMJqC/jWPKZDN8s3F2fIoNZkJk+BoAiUwKbd0pCCtivTEvmcgpbe00TAFE0zyuqL C7ZQd6d824Oa+ZGAl9vzpj+hKCL0EUvvr9QCkRAdf0obzWNK0mPj1zPumKvas6TYCMgt kMBcMyYJ/e1HGQBruxdEw/INshrGKeyWkHIAxqzq5oqdTVoFBXNWzD7yoibQ/+Y0fvlc 7c1ED7oRp8IMMBe/ZUI6R/B8pSUZWGTGsZQCNypGeVD5yl03zlE+K4Xm4OFrLjvAbWTA +YmJtqr+TUpgHNHV//K7XXu19O8N9fUfFo5L+T6ioAX/JiGW5Fz7yMK7p/jFZCkyqiA9 gDHA== X-Gm-Message-State: AOAM5318vR8B6F2rOvsyvTwMGx+mOXhBOZjSb04aTwtvtRh4F5c/tDma SdqWItL5UgJ0a+UdrLhy6TGXarwZ1WvU9jhBTYk= X-Google-Smtp-Source: ABdhPJy5vl0fz8l2niGSKys092bFHdf4r/YZUM4RTzBiC4X2uCCTeesWPoBRPXDjttHj770/TMPtQfaUhFrafzE3T/s= X-Received: by 2002:ac2:5a02:: with SMTP id q2mr1178375lfn.367.1617732160589; Tue, 06 Apr 2021 11:02:40 -0700 (PDT) MIME-Version: 1.0 References: <606b899c.1c69fb81.c1812.d659SMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <606b899c.1c69fb81.c1812.d659SMTPIN_ADDED_MISSING@mx.google.com> Date: Tue, 6 Apr 2021 11:02:14 -0700 Message-ID: To: Mark Randall Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000c611d805bf519e50" Subject: Re: [PHP-DEV] Re: [RFC] Autoloader Classmap From: matthewfonda@gmail.com (Matt Fonda) --000000000000c611d805bf519e50 Content-Type: text/plain; charset="UTF-8" Hi Mark, I'm a fan of adding an easy and performant way to implement classmap-based autolading, but weary of adding yet another way to autoload. If it would be possible to do so without negating the performance improvements, I'd suggest having this work in conjunction with the existing spl_autoload_register rather than introducing two different ways to specify autoloaders. I.e., usage would look like: spl_autoload_register(autoload_classmap($mapping)); Cheers, --Matthew On Mon, Apr 5, 2021 at 3:05 PM Mark Randall wrote: > 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. > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --000000000000c611d805bf519e50--