Feature #43193
Optimize Classloader
Status: | Rejected | Start date: | 2012-11-21 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Christopher Hlubek | % Done: | 0% |
|
Category: | - | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No |
Description
The default FileBackend does an expiration check on any call to require, which costs quite some syscalls. For the classes cache we could generally disable expiration (maybe with a backend option). For frozen packages this is already the case, but in Production a package cannot be frozen.
History
#1 Updated by Robert Lemke over 2 years ago
- Status changed from New to Rejected
That's what freezable cache backends are for. In Production Flow uses a freezable cache backend for code caches and freezes it as soon as proxy classes have been written.
#2 Updated by Christopher Hlubek over 2 years ago
Not exactly (there is no frozen code cache), but I also didn't notice, that for code caches the SimpleFileBackend
is used, which doesn't do any expiration checks.
Robert Lemke wrote:
That's what freezable cache backends are for. In Production Flow uses a freezable cache backend for code caches and freezes it as soon as proxy classes have been written.
#3 Updated by Robert Lemke over 2 years ago
Christopher Hlubek wrote:
Not exactly (there is no frozen code cache), but I also didn't notice, that for code caches the
SimpleFileBackend
is used, which doesn't do any expiration checks.Robert Lemke wrote:
That's what freezable cache backends are for. In Production Flow uses a freezable cache backend for code caches and freezes it as soon as proxy classes have been written.
I was referring to "FreezableBackendInterface". In production the compiler will detect freezable cache backends and then freeze the code caches:
if ($this->bootstrap->getContext()->isProduction() && $classesCacheBackend instanceof FreezableBackendInterface) { $classesCache->getBackend()->freeze(); }
(see CoreCommandController)