|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #57343 [Feature request] Caching opcode to a file
Submitted: 2006-11-04 08:28 UTC Modified: 2006-11-06 00:33 UTC
From: arnaud dot lb at gmail dot com Assigned:
Status: Wont fix Package: APC (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-11-04 08:28 UTC] arnaud dot lb at gmail dot com
I'd like to be able to cache opcode into a file, and then 
include it with a function like apc_include.

It could be useful to cache auto-generated PHP code like 
cached smarty templates in a file when their is too many 
files to cache them in memory.

I dream of an apc_compile(code) function :)

An other solution should be to cache opcode on disk when 
their is not enougth free memory segments.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-04 11:46 UTC]
The performance improvement would actually be minor.  Caching opcodes in shared memory is fast because it skips the disk reads on the file itself, and because it skips the compile step that creates the op_array in memory for  the executor to execute directly.  Caching to disk would mean we still have to perform disk reads and we still need to copy the read op_array into memory for the executor.  So while it would be slightly faster, I am not sure it would be worth the extra complexity on either end here.
 [2006-11-06 00:33 UTC] gopalv82 at yahoo dot com
The gain in converting in-memory pointers into offsets and re-fixing them up is quite pointless when you do it only once for a few thousand requests - might as well compile from source.

And there's a bcompiler ...
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 02:01:29 2024 UTC