Improve autoloading efficiency
-
The current autoloading behavior used by Polylang is brutal, it calls
file_exists
(which has to go out to disk) three times for each class PHP loads, regardless of whether or not the class belongs to polylang.If you are using object-orientated libraries which could load hundreds of classes, this is a lot of unnecessary disk access.
A quick grep of the codebase tells me that you should be able to prevent this via:
if(0 !== substr_compare('PLL_', $class, 0, 4)) return;
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Improve autoloading efficiency’ is closed to new replies.