框架比较和开销 [英] Framework Comparison and Overhead

查看:17
本文介绍了框架比较和开销的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一款使用 Zend 框架开发的 Facebook 游戏.现在我没有很多流量,并且已经看到相当大的数据使用量/CPU 时间.

I am working on a Facebook game which is developed using Zend framework. Right now I don't have lots of traffic and already seen quite a large # of data usage / CPU time.

实际上,我不擅长 Zend.我擅长从头开始为 PHP & 编写代码.JS.

Actually, I'm not good at Zend. I good at coding from scratch for both PHP & JS.

所以,我很好奇 Zend 框架的性能.因为我正在考虑使用 Zend 作为后端来重建应用程序来管理数据/会话/逻辑.并使用 JS(原生代码或 JQuery)进行前端渲染 UI 并在客户端处理用户操作.

so, I am curious about the performance of Zend framework. becuase I'm thinking about rebuilding the applciation using Zend as the backend to manage the data / session / logic. and use JS (native code or JQuery) for the front-end rendering UI and handle user action in the client side.

在两者之间,使用 aJax 从 Zend 后端获取数据......很可能是 REST.
有人对这种结构有建议吗?我想借此减少服务器负载,同时更易于管理代码,以及更好的用户体验.

In between, use aJax to get data from Zend backend.. most likely REST.
Anyone has suggestion about this kind of structure? I want to cut down the server load by that and also easier to manage code, plus better user experience.

感谢有人有好主意.:)

Appreciate if anyone has good idea. :)

(几天后发布)

因此,与 Zend(或任何)框架相比,基线 PHP 应该更快并且使用更少的数据传输(如果代码正确),对吗?代码可重用性在这里不是一个大问题.:)

so, baseline PHP should be faster and use less data transfer (if code correctly) then Zend (or any) framework, right? Code reusablility is not a big concern here. :)

推荐答案

如果您认为基于 ZF 的应用程序运行缓慢,那么首先要做的只有一件事.测量它.存在各种工具,它们将采用 Xdebug 的分析输出来显示哪些部分正在减慢进程,然后您可以采取一些措施来优化这些部分(例如更轻的初始化和/或一些缓存).survivethedeepend.comZF 应用程序的性能优化".

There is only one thing to do first if you think that a ZF-based app is slow. Measure it. Various tools exist that will take the profiling output of Xdebug to show you which parts are slowing down the process, then you can make some moves towards optimising those parts (such as a lighter weight initialisation, and/or some caching). One good resource is the the Zend Framework book at survivethedeepend.com, "performance optimisation for ZF Apps".

这篇关于框架比较和开销的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆