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

    1. <tfoot id='Bv6NH'></tfoot>
    2. <i id='Bv6NH'><tr id='Bv6NH'><dt id='Bv6NH'><q id='Bv6NH'><span id='Bv6NH'><b id='Bv6NH'><form id='Bv6NH'><ins id='Bv6NH'></ins><ul id='Bv6NH'></ul><sub id='Bv6NH'></sub></form><legend id='Bv6NH'></legend><bdo id='Bv6NH'><pre id='Bv6NH'><center id='Bv6NH'></center></pre></bdo></b><th id='Bv6NH'></th></span></q></dt></tr></i><div id='Bv6NH'><tfoot id='Bv6NH'></tfoot><dl id='Bv6NH'><fieldset id='Bv6NH'></fieldset></dl></div>
    3. <small id='Bv6NH'></small><noframes id='Bv6NH'>

      <legend id='Bv6NH'><style id='Bv6NH'><dir id='Bv6NH'><q id='Bv6NH'></q></dir></style></legend>
    4. 将 Zend Framework 用于高负载项目

      时间:2023-10-03
          <tbody id='mgrd1'></tbody>

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

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

              • 本文介绍了将 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 用于高负载项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

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

                相关文章

                最新文章

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

              • <legend id='tD2LF'><style id='tD2LF'><dir id='tD2LF'><q id='tD2LF'></q></dir></style></legend>
              • <small id='tD2LF'></small><noframes id='tD2LF'>

                  <bdo id='tD2LF'></bdo><ul id='tD2LF'></ul>
                <tfoot id='tD2LF'></tfoot>