Web CMS 性能:页面/秒(Joomla、Drupal、Plone、WP)

发布于 2024-08-19 01:47:20 字数 442 浏览 3 评论 0原文

注意:我不喜欢网络编程,所以如果问题很微不足道,请原谅我的无知。另外,请不要评论这些产品的开箱即用比较“有多么缺陷”。问题不在于它们如何相互竞争,而在于它们所有人都难以置信的缓慢背后的原因。

只需阅读基准,其中 Joomla、Drupal、Wordpress、Plone3 和4 已被测试。让我震惊的是:开箱即用,它们的速度大约为 4-14 页/秒。这怎么可能,为什么他们这么慢? CMS 应该只查询数据库并将数据打包到漂亮的模板中。 DB 速度很快。模板应该很快(文本替换,没什么大不了的)。我们的机器速度超快,但这些高端 CMS 每秒只能生成几页。怎么会?

Note: I am not into web programming, so forgive my ignorance in case the question is trivial. Also, please don't comment about "how flawed" the out-of-box comparison of these products is. The question is not about how they compete against each other, rather about the reason behind the incredible slowness of ALL of them.

Just read about a benchmark, where Joomla, Drupal, Wordpress, Plone3 & 4 had been tested. What shocked me is this: out of the box they performed around 4-14 pages/sec. How is this possible, why are they so damn slow? A CMS should just query a DB and churn out the data packed into nice templates. DBs are fast. Templates should be fast (text replacement, no big deal). Our machines are superfast and yet, these high profile CMSs could only produce a few pages/sec. How come?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

全部不再 2024-08-26 01:47:20

CMS 应该只查询数据库并将数据打包到漂亮的模板中。

没那么多。主要的现代 CMS 系统极其复杂。典型的页面不仅仅是正文和标题,还包括基于类别的动态内容查询,可聚合多个站点区域的信息;更不用说安全调整和用户特定的内容区域了。例如,加载 http://www.volvogroup.com 至少涉及其中 7 个查询,再加上递归网站结构以生成导航,并连接到外部系统以提取新闻和投资者关系数据。考虑到这一点,需要一个强大的服务器场才能每秒提供数百次点击也就不足为奇了。

A CMS should just query a DB and churn out the data packed into nice templates.

Not so much. Major, modern CMS systems are incredibly complex beasts. A typical page isn't merely body text and a title, but also dynamic category-based content queries that aggregate info across many site areas; not to mention security trimming and user-specific content zones. For example, loading http://www.volvogroup.com involves at least 7 of these queries, plus recursion through the site structure to generate navigation, and connecting to external systems to pull in news and investor relations data. Considering that, it shouldn't be such a surprise that it takes a beefy server farm to serve up several hundred hits per second.

樱花落人离去 2024-08-26 01:47:20

因为完成所有这些需要大量的处理。这不是“查询、替换、渲染”的问题。所有这些产品都是为适应广泛的用例而设计的,并且可以在一定程度上进行扩展,因此实际上您所讨论的这 3 个基本操作被分为许多很多操作,所有这些操作都消耗时间。

在所有条件相同的情况下,系统越灵活,“开箱即用”的速度就越慢。

Because it takes a alot of processing to do all of that. ITs not a matter of "query, replace, render". All of thes products are made to fit a wide range of use cases and to be extensible to some degree so really those 3 basic operations your are talking about are split up into many, many operations all of which consume time.

All things being equal - the more flexible he system the slower it will be "out of the box".

鲜血染红嫁衣 2024-08-26 01:47:20

它们运行缓慢有以下几个原因:

1 - 大多数都是模块化的,这意味着更多的文件、更多的代码和更多的数据库查询。

2 - 他们很大程度上(而不是wordpress)尝试做所有事情,再次为每种可能的情况设计一个系统,使其变得更加复杂和难以调整。

3 - 其中大多数(当前)支持 PHP4 和 PHP5,这又只是额外的工作。

4 - 据称,它们是为了让非技术用户也可以使用它们而设计的,这意味着他们经常不得不以不是最有效的方式做事,即 Drupals CCK / Views 允许无法有效编程的人创建数据库表和SQL 查询的缺陷是这些表/查询的设计非常通用,与自定义编码工作相比效率相当低。

5 - 他们倾向于使用大量的数据库查询,Drupal 在一个非常基本的页面中使用 40 个左右,如果您搜索他们的论坛,您会看到有人声称某些页面进行了数百甚至一千多个查询的报告。

他们当然提供缓存,并且 Drupal 可以从其 boost 模块等方面获得相当好的性能,缺陷是 Drupal(和 Joomla)的卖点之一是您可以在其中创建社区网站、论坛、类似 Digg 的网站、所有网站缓存的用途有限......

They are slow for a few reasons:

1 - Most of them are very modular,that means more files, more code and more DB queries.

2 - They largely (not wordpress so much) try to do everything, again designing a system for every possible situation makes it more complex and harder to tune.

3 - Most of them (currently) support both PHP4 and PHP5, this is again just extra work.

4 - They are allegedly made so non-technical users can use them, which means they often have to do things in a way that is not the most efficient, i.e. Drupals CCK / Views lets people that can't programme effectively create database tables and SQL queries, the flaw being these tables / queries are very general in design and are rather inefficient in comparison to custom coded efforts.

5 - They tend to use lots of DB queries, Drupal uses 40 or so for a very basic page and if you search their forums you will see reports of people claiming some pages make hundreds or even over a thousand queries.

They do of course offer caching and Drupal can get quite good performance from things like its boost module, the flaw being one of Drupal's (and Joomla's) selling points is you can make a community site, forum, Digg like site in it, all sites where caching is of limited use...

平安喜乐 2024-08-26 01:47:20

它们是相对复杂的系统。它们允许很多插件挂钩,因此从请求到响应的工作流程中有很多步骤。

然而,在现实世界中,缓存(无论是应用程序内缓存还是操作码缓存)可以极大地提高性能。

我不熟悉 Plone,但 PHP CMS 本质上必须通过每个请求加载和解释几乎整个系统。

They are relatively complex systems. They allow a lot of hooks for plugins, so there's a lot of steps in the workflow from request to response.

In the real world, however, caching (whether in-application or opcode caching) is a tremendous boost to performance.

I'm not familiar with Plone, but the PHP CMSs essentially have to load and interpret almost the entire system with every single request.

锦欢 2024-08-26 01:47:20

请不要对此生气,但是通过解释您对网络编程的不熟悉来引出您的问题,然后批评您看来“简单”操作的性能有点短视。

我鼓励您更多地了解 CMS 解决的常见问题,以及动态网页和 HTTP 如何工作的一般理论和实践。它远非简单的 I/O 操作。

另外,为了实际使用,我强烈鼓励任何运行 CMS 的人寻找缓存解决方案。缓存旨在解决网络技术中出现的许多“速度”问题。它应该是任何常见网络堆栈的一部分。

Please don't take offense to this, but to preface your question by explaining your unfamiliarity with web programming, and then criticize the performance of what appears to you to be a 'simple' operation is a bit short-sighted.

I would encourage you to learn a bit more about the common problems a CMS solves, and the general theory and practice of how dynamic web pages and HTTP work. It's far from a simple I/O operation.

Also, for practical use, I would highly encourage anyone running a CMS to find a caching solution. Caching is intended to solve a lot of the 'speed' problems that arise in web technology. It should be part of any common web stack.

淡紫姑娘! 2024-08-26 01:47:20

在我看来:

因为 CMS 和框架考虑了您需要的所有东西,您可以使用:
就像

  • 过滤用户输入
  • 创建 PDF、AJAX 输出模板等等

这取决于您的需要,您真正需要什么

我不同意您写的内容

CMS 应该只查询数据库并将数据打包到漂亮的模板中。

CMS 可以做更多的事情,更多...

最后但并非最不重要的一点是,不要将桌面软件速度与 Wep 应用程序进行比较。

有很大的不同

In my opinion :

Because CMS and frameworks think of all the things you need, that you can use:
like

  • Filter userinput
  • Create PDF,AJAX Output Template and alot more

It Depends on your need, what you realy need

Im not agree what you wrote

A CMS should just query a DB and churn out the data packed into nice templates.

A CMS Does a lot more things alot more ...

And at last but not least dont compare Desktop Software Speed with Wep Aplication.

There is a Big Difference

随心而道 2024-08-26 01:47:20

CMS 可以做更多的事情,更多...

最后但并非最不重要的一点是,不要将桌面软件速度与 Wep 应用程序进行比较。

有很大的不同

A CMS Does a lot more things alot more ...

And at last but not least dont compare Desktop Software Speed with Wep Aplication.

There is a Big Difference

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文