php – 使用Zend Framework进行高负载项目

前端之家收集整理的这篇文章主要介绍了php – 使用Zend Framework进行高负载项目前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Zend框架是一个很好的框架,但并不是很快.
你能否告诉他们是否值得使用Zend Framework进行高负载工程,例如,电子邮件营销服务可能包含大约十个或十几万个用户
使用Zend Framework可以实现可接受的性能吗?
有人有这样的到期吗?
非常感谢你.
对于我看到的,Zend Framework性能的最终防御和性能优化的建议来自于Padraic Brady:

PHP Framework Benchmarks: Entertaining But Ultimately Useless

特别要注意他的四个性能优化建议:

  1. Don’t use Zend_Application. While Zend_App is great for creating consistent complex bootstraps within a standardised structure,it doesn’t come without a significant performance hit to baseline performance. A more direct bootstrap (typical of ZF until Zend_App arrived) is far faster and can also be done without configuration files.

  2. Skip using the ViewRenderer plugin. Without the ViewRenderer,you need to manually configure Zend_View and add render() calls to Controllers. This is actually very simple to do and is fairly fast – fast was never really part of the ViewRenderer’s genetics.

  3. Use autoloading. Strip require_once calls from the framework library so unneeded files are ignored. Replace uses of Zend_Loader_Autoloader with a not-so-crazy autoloader function. In fact,pray Zend_Loader is never used – it does a lot of file ops that,to date,have never been explained to me as having any value.

  4. Preload everything (Symfony 2 Preview does!). It buys you some performance cookies and equalises the speed baseline. Using a simple preload script is not that hard.

原文链接:https://www.f2er.com/php/131591.html

猜你在找的PHP相关文章