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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: arnaud dot lb at gmail dot com
New email:
PHP Version: OS:

 

 [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-2020 The PHP Group
All rights reserved.
Last updated: Mon Sep 28 13:01:23 2020 UTC