简体   繁体   中英

PHP Phar Deployment Performance

I am considering architecting our php app's deployment process such that the build's output produces a single phar archive for the necessary code to run the app in production. I am wondering about the performance of deploying a web app in this way versus the traditional model of checking out or copying the source tree itself to the document root for the web-server.

There are benefits to the packaged approach in that the package can be fully prepped by the CI server (removing test code for example) and then a single archive just copied to the server for deployment. The pristine archives can be stored in a repository as well.

I don't want to use this approach if running the app as a phar will cause a bottleneck however. Are there issues with loading the source out of the phar? The app uses autoloading via composer to load source.

I benchmarked a application back in 2011; speed was not an issue with phar.

There will be minor problems loading source code and template files - depending on how you do it currently. But all in all, this won't be impossible problems.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM