inviqa / harness-base-php

Base PHP harness for workspace https://github.com/my127/workspace
Other
4 stars 5 forks source link

Preload files into opcache #493

Open kierenevans opened 3 years ago

kierenevans commented 3 years ago

PHP 7.4 and above can use opcache.preload

Older versions can use cachetool's opcache:compile-scripts command

This helps avoid longer requests when opcache is empty, though visitors may be unlucky to hit files that are not yet compiled.

andytson-inviqa commented 3 years ago

it's recommended to only preload files you are using, so e.g not the whole vendor directory, so should be something the project can configure a list to allow preloading.

NoDiskInDriveA commented 7 months ago

@kierenevans If this is still needed - what's the challenge here? Compiling the preload script with includes so it works without autoloader? I'm asking cause atm I'm building a tool that does something very similar.