Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103366 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 57229 invoked from network); 22 Oct 2018 15:16:53 -0000 Received: from unknown (HELO ares.art-core.org) (81.169.138.148) by pb1.pair.com with SMTP; 22 Oct 2018 15:16:53 -0000 Received: by ares.art-core.org (mail.art-core.org, from userid 104) id 8BDEC10380CF3; Mon, 22 Oct 2018 11:31:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on h1398771.stratoserver.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Received: from parakeet (host-93-104-237-94.customer.m-online.net [93.104.237.94]) by ares.art-core.org (mail.art-core.org) with ESMTPSA id 729E7103800C8; Mon, 22 Oct 2018 11:31:27 +0000 (UTC) Message-ID: To: Dmitry Stogov Cc: PHP internals Date: Mon, 22 Oct 2018 13:31:26 +0200 References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Preloading From: ml@anderiasch.de (Florian Anderiasch) On Fri, Oct 19, 2018 at 10:17 AM, Dmitry Stogov wrote: > Hi Internals, > > > I would like to start discussion on a Preloadng RFC > https://wiki.php.net/rfc/preload > This sounds great, but something about the last paragraph: > And also, this approach will not be compatible with servers that host multiple applications, or multiple versions of applications - that would have different implementations for certain classes with the same name - if such classes are preloaded from the codebase of one app, it will conflict with loading the different class implementation from the other app(s). Please excuse my lack of knowledge about the opcache internals, but can't this be remedied by some kind of namespacing? I don't know how the lookup rules are, but I assume it's by file path - so if you're preloading and serving preloading bundles, shouldn't this (at least as a PoC) work with a random prefix, or even the app entry point? This whole thing is basically tailored to people running their own applications on their own stack - but if this restriction was lifted this could be handy for shared hosting or even for people with multiple application (stacks) on the same webserver. Yes, I'm sure it's not that simple, but I don't really grasp why this is different than the current opcache lookup rules. Greetings, Florian