加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

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

发布时间:2020-12-13 17:27:32 所属栏目:PHP教程 来源:网络整理
导读:Zend框架是一个很好的框架,但并不是很快. 你能否告诉他们是否值得使用Zend Framework进行高负载工程,例如,电子邮件营销服务可能包含大约十个或十几万个用户? 使用Zend Framework可以实现可接受的性能吗? 有人有这样的到期吗? 非常感谢你. 对于我看到的,Ze
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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读