php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
20 + 37 = ?
Subscribe to this entry?

 
 [2006-11-04 08:28 UTC] arnaud dot lb at gmail dot com
Description:
------------
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-04 11:46 UTC] rasmus@php.net
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-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 24 18:01:23 2021 UTC