Re: Question regarding stream wrappers and op code cache
| From: | Cesar Rodas | Date: | Wed, 04 Feb 2015 16:14:05 +0000 |
| Subject: | Re: Question regarding stream wrappers and op code cache | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81822@lists.php.net to get a copy of this message | ||
On 04/02/15 04:19, François Laupretre wrote:
>> De : Cesar Rodas [mailto:cesar@rodas.me]
>> I have a doubt, is it efficient include/require files from a source
>> different than the "real file system" a stream wrapper class? My
>> question is, would the op-code cache work as it would when reading a
>> file form the filesystem?
> I understand your question but, yes, the feature is essential to packages systems like phar and
> phk (and it is useless for most other stream wrappers). Package systems distribute a virtual file
> tree, handle stat(), and returning valid mtimes. So, the opcode cache must be able to work with
> these stream wrappers.
I'm working on a project to *put* all generated code inside a single
file (and expose through "generated://doctrine" or
"generated://<package-name>") but it's pointless if the compiled op-code
is not cached :-(
I believe this https://wiki.php.net/rfc/streams-is-cacheable
would be
brilliant!
Cheers,
>
> Regards
>
> François
>
>
--
César D. Rodas
Open Source developer
+595-983-161124
PGP: F9ED A265 A3AB C8A1 D145 7368 158A 0336 C707 0AA6
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc