Re: [RFC] Preloading

From: Date: Mon, 22 Oct 2018 11:31:26 +0000
Subject: Re: [RFC] Preloading
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-103366@lists.php.net to get a copy of this message
On Fri, Oct 19, 2018 at 10:17 AM, Dmitry Stogov <dmitry@zend.com> 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

« previous php.internals (#103366) next »