The APC classloader enables significant speedups over the default classloader, and APC user cache is available to many, maybe most, PHP hosts. Enabling it by default therefore provides "fast by default" to deployments which would not necessarily consider enabling it.
A issue of concern may be the case of multiple web heads not being invalidated. However, as discussed at DDD Montpellier with alexpott, amateescu, berdir, fgm, pwolanin, webchick, wim leers, and xjm, because of the current implementation of the APC classloader as a decorator, misses resulting from new deployments are not a concern, and neither are extra entries after some code is removed because corresponding classes are then no longer loaded, so even deployments with multiple web heads should not encounter specific issues with this use of APCu.
berdir has been running big, complex Drupal 8 sites in production environments with multiple web heads, and confirmed that this works fine.
Provide detection of APC classloading ability and enable it by default, providing a killswitch variable to prevent detection for users wishing another strategy.
Refresh or create documentation specific to sites with multiple web heads, in a followup (): they are affected by other consistency issues even more than this one.
User interface changes
A new setting is available as
class_loader_auto_detect, defaulted to
TRUE. Setting it to
FALSE disables this automatic enablement of the APC class loader.
Beta phase evaluation
|Issue category||Task because D8 works without it, and this does not bring a new user-visible feature|
|Issue priority||Major because we want D8 "Fast by default", and this allows significant load time improvements for an estimated 90% or more of all D8 sites (in number of sites, not number of requests). Not critical because it is not the biggest performance gain to be had.|
|Prioritized changes||The main goal of this issue is performance.|
|Disruption||Not disruptive for core/contributed and custom modules, because they should be transparent to the used class loader.|
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 91,452 pass(es). View
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 91,424 pass(es). View