<small id='JkBTc'></small><noframes id='JkBTc'>

<legend id='JkBTc'><style id='JkBTc'><dir id='JkBTc'><q id='JkBTc'></q></dir></style></legend>

    <i id='JkBTc'><tr id='JkBTc'><dt id='JkBTc'><q id='JkBTc'><span id='JkBTc'><b id='JkBTc'><form id='JkBTc'><ins id='JkBTc'></ins><ul id='JkBTc'></ul><sub id='JkBTc'></sub></form><legend id='JkBTc'></legend><bdo id='JkBTc'><pre id='JkBTc'><center id='JkBTc'></center></pre></bdo></b><th id='JkBTc'></th></span></q></dt></tr></i><div id='JkBTc'><tfoot id='JkBTc'></tfoot><dl id='JkBTc'><fieldset id='JkBTc'></fieldset></dl></div>
      <bdo id='JkBTc'></bdo><ul id='JkBTc'></ul>

    1. <tfoot id='JkBTc'></tfoot>
      1. 将 Zend Framework 用于高负载项目

        时间:2023-05-31
      2. <small id='hGJhe'></small><noframes id='hGJhe'>

        <i id='hGJhe'><tr id='hGJhe'><dt id='hGJhe'><q id='hGJhe'><span id='hGJhe'><b id='hGJhe'><form id='hGJhe'><ins id='hGJhe'></ins><ul id='hGJhe'></ul><sub id='hGJhe'></sub></form><legend id='hGJhe'></legend><bdo id='hGJhe'><pre id='hGJhe'><center id='hGJhe'></center></pre></bdo></b><th id='hGJhe'></th></span></q></dt></tr></i><div id='hGJhe'><tfoot id='hGJhe'></tfoot><dl id='hGJhe'><fieldset id='hGJhe'></fieldset></dl></div>
            <tbody id='hGJhe'></tbody>

            <tfoot id='hGJhe'></tfoot>
          1. <legend id='hGJhe'><style id='hGJhe'><dir id='hGJhe'><q id='hGJhe'></q></dir></style></legend>

                <bdo id='hGJhe'></bdo><ul id='hGJhe'></ul>

                  本文介绍了将 Zend Framework 用于高负载项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  Zend Framework 是一个很好的框架,但速度不是很快.您能否判断将 Zend Framework 用于高负载项目是否值得,例如,对于可能包含大约十或数千名用户的电子邮件营销服务?使用 Zend Framework 是否可以达到可接受的性能?有人有这样的经历吗?非常感谢.

                  解决方案

                  就我所见,对 Zend Framework 性能的最终防御和性能优化建议来自 Padraic Brady:

                  PHP 框架基准:有趣但最终没用

                  特别要注意他关于性能优化的四项建议:

                  <块引用>

                  1. 不要使用 Zend_Application.虽然 Zend_App 非常适合在标准化结构中创建一致的复杂引导程序,但它对基线性能的影响也很大.更直接的引导程序(ZF 在 Zend_App 到来之前是典型的)要快得多,而且无需配置文件即可完成.

                  2. 跳过使用 ViewRenderer 插件.如果没有 ViewRenderer,您需要手动配置 Zend_View 并向控制器添加 render() 调用.这实际上非常简单,而且速度相当快 - 速度从来都不是 ViewRenderer 遗传学的真正组成部分.

                  3. 使用自动加载.从框架库中去除 require_once 调用,以便忽略不需要的文件.用一个不那么疯狂的自动加载器函数替换 Zend_Loader_Autoloader 的使用.事实上,祈祷 Zend_Loader 永远不会被使用——它执行了很多文件操作,迄今为止,我从未向我解释过这些操作具有任何价值.

                  4. 预加载所有内容(Symfony 2 Preview 可以!).它会为您购买一些性能 cookie 并平衡速度基线.使用简单的预加载脚本并不难.

                  Zend Framework is a good framework but not very fast. Can you tell whether it's worth using Zend Framework for highload projects, for example, for email marketing service that can inlude about ten or houndred thousand of users? Is it possible to achive acceptable performance using Zend Framework? Has anybody such an expirience? Thank you very much.

                  解决方案

                  For what I have seen, the definitive defense of Zend Framework performance and recommendations for performance optimization comes from Padraic Brady at:

                  PHP Framework Benchmarks: Entertaining But Ultimately Useless

                  In particular, note his four recommendations for performance optimization:

                  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.

                  这篇关于将 Zend Framework 用于高负载项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:PHP中的两个冒号是什么意思? 下一篇:Zend Framework - 多板导航块

                  相关文章

                    <bdo id='TNAj2'></bdo><ul id='TNAj2'></ul>
                • <i id='TNAj2'><tr id='TNAj2'><dt id='TNAj2'><q id='TNAj2'><span id='TNAj2'><b id='TNAj2'><form id='TNAj2'><ins id='TNAj2'></ins><ul id='TNAj2'></ul><sub id='TNAj2'></sub></form><legend id='TNAj2'></legend><bdo id='TNAj2'><pre id='TNAj2'><center id='TNAj2'></center></pre></bdo></b><th id='TNAj2'></th></span></q></dt></tr></i><div id='TNAj2'><tfoot id='TNAj2'></tfoot><dl id='TNAj2'><fieldset id='TNAj2'></fieldset></dl></div>

                  <small id='TNAj2'></small><noframes id='TNAj2'>

                      <legend id='TNAj2'><style id='TNAj2'><dir id='TNAj2'><q id='TNAj2'></q></dir></style></legend>

                      <tfoot id='TNAj2'></tfoot>