markus_blue_tomato Posted July 31, 2020 Share Posted July 31, 2020 Has anybody tried PHP Preloading in PHP 7.4 with Processwire yet? https://stitcher.io/blog/preloading-in-php-74 Sounds interessting... I would Preload all files in /vendor/ and /wire/. What do you think? 2 Link to comment Share on other sites More sharing options...
teppo Posted July 31, 2020 Share Posted July 31, 2020 Quote So this is where preloading comes into play: it will not only compile source files to opcodes, but also link related classes, traits and interfaces together. It will then keep this "compiled" blob of runnable code — that is: code usable by the PHP interpreter — in memory. And from the RFC: Quote And also, this approach will not be compatible with servers that host multiple applications, or multiple versions of applications - that would have different implementations for certain classes with the same name - if such classes are preloaded from the codebase of one app, it will conflict with loading the different class implementation from the other app(s). While I'd love to give this a try, this limitation is a dealbreaker for me. All the environments I work with host multiple versions of ProcessWire. Might be another reason to move to fully containerized environment... ? 2 1 Link to comment Share on other sites More sharing options...
Recommended Posts