RE: [PHP-DEV] PHP Script Compile System
| From: | John Crenshaw | Date: | Wed, 22 Feb 2012 06:16:52 +0000 |
| Subject: | RE: [PHP-DEV] PHP Script Compile System | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-57934@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Deepak Balani [mailto:wgpdeepak1989@gmail.com]
> Sent: Wednesday, February 22, 2012 1:07 AM
> To: flavius@php.net
> Cc: internals@lists.php.net
> Subject: Re: [PHP-DEV] PHP Script Compile System
>
> No I mean persistent compilation system like
>
> Java
>
> HelloWorld.Java -> HelloWorld.class
>
>
> HelloWorld.php -> HelloWorld.gpc
>
> When you call
>
> gpc_import('HelloWorld.php');
>
> then function first look for HelloWorld.gpc if found then include it and if not then look for
> HelloWorld.php or HelloWorld.inc (whatever the setting is) if found compile it and include it
> else
> raise an error.
Can you explain how this is better or functionally different from the behavior of APC? APC caches
bytecode this way too. Unless I've horribly misunderstood something, when you include the file
APC uses the cached bytecode as long as it is available and the file was not since modified. If the
file was modified APC recompiles it and caches the bytecode. Sounds like the same net result to me,
except that APC is less complicated, requires no code changes, and automatically clears its own
cache.
Did I miss something?
John Crenshaw
Priacta, Inc.