Page MenuHomePhabricator

Use static arrays for ExtensionRegistry::loadFromQueue caching
Open, Needs TriagePublic

Description

As explained in T225730#10396663, APCu tends to be really slow with large values, especially arrays, because it needs to copy data from shared memory. The upstream issue hasn't received much love. It seems that one way to speed this up would be to go the l10n cache route and save static PHP arrays on disk. This, thanks to opcache, should give us blazing fast access to the data, much faster than APCu.

Event Timeline

Time is a flat circle, back to loading extension information from PHP it seems :) This was proposed as part of the original RfC even:

Reading and parsing a JSON file will be slower than loading a PHP file due to APC and other factors. However, we can mitigate that by providing a script to "compile" all the required JSON files into their PHP equivalents.

Pretty cool that we never needed that for 10 years.