简体   繁体   English

Drupal 7比Drupal 6慢吗?

[英]Is Drupal 7 slower than Drupal 6?

One of the problems with Drupal in general is that it is slow. Drupal的一个问题一般是它很慢。 We run Pressflow 6 in a high traffic production environment and it consumes a lot of resources for a site of its size. 我们在高流量生产环境中运行Pressflow 6,它为其大小的站点消耗了大量资源。

Much has been made of whether Drupal 7 is slower than Drupal 6: http://drupal.org/node/615822 Drupal 7是否比Drupal 6慢得多: http//drupal.org/node/615822

It appears that this is indeed the case, but can anybody confirm? 看来,这的确这样,但是任何人可以证实?

Many thanks, Chris. 非常感谢,克里斯。

Yes. 是。 I can confirm. 我可以证实。 However. 然而。

First the bad news: 首先是坏消息:

  • Drupal7 core is more complex. Drupal7核心更复杂。 Complexity costs performance. 复杂性会降低性能。
  • Drupal7 core is bigger: more features, more in core. Drupal7核心更大:功能更多,核心更多。 more equals slower . 等于

Then the theory: 然后理论:

  • In Drupal6, approx. 在Drupal6中,约。 95% of the projects included CCK. 95%的项目包括CCK。 Call that Drupal+. 叫那个Drupal +。 Drupal7 comes with CCK out of the box. Drupal7带有CCK开箱即用。 Drupal6+ is slower then Drupal7. Drupal6 + Drupal7
  • Drupal7 offers a lot of enterpris-ish abilities for performance tuning. Drupal7提供了很多企业级的性能调优能力。 Memcached, (Varnished)Proxy support, Database balancing (master/slave etc). Memcached,(Varnished)代理支持,数据库平衡(主/从等)。 Something that Drupal6 could not do. Drupal6无法做到的事情。

However, Drupal6 pressflow had these enterprise-ish things build in (in fact: these pressflow features made it into core, offering the basis for Drupal7). 但是, Drupal6 pressflow有这些企业内置的东西 (实际上:这些压力流功能使其成为核心,为Drupal7提供了基础)。

Drupal7 is slower then Pressflow Drupal6 . Drupal7比Pressflow Drupal6慢 Drupal7 offers performance features that Drupal6 did not offer, but that PressflowDrupal6 did offer. Drupal7提供了Drupal6没有提供的性能特性,但是PressflowDrupal6确实提供了。

Many projects also have views module enabled. 许多项目还启用了视图模块。 Views3 in Drupal7 offer a lot of performance improvements (enterprise-ish features) over Views2 for Drupal6. Drupal7中的Views3为Drupal6的Views2提供了很多性能改进(企业级功能)。

My advice: untill there is a performance-optimised Drupal7 (Pressflow Drupal7, for example) Just stay with your Pressflow Drupal 6. It is in both theory and practice a lot faster. 我的建议:直到有一个性能优化的Drupal7(例如Pressflow Drupal7)只需留下你的Pressflow Drupal 6.它在理论和实践中都要快得多。 If you can benefit from the Views3 improvements and features, then go for Drupal7+views3, that will give you more options to tune performanceissues. 如果您可以从Views3的改进和功能中受益,那么请选择Drupal7 + views3,这将为您提供更多选项来调整性能问题。

Depends. 要看。

Yes, out of the box, D7 is slower than D6. 是的,开箱即用,D7比D6慢。 But a lot of effort has been put into making it scale (Which is a different thing than being performant). 但是已经付出了很多努力使其规模化 (这与表现不同)。

Many of these features are actually already part of Pressflow 6 like support for master/slave database cluster, proxy, improvements to alias handling and so on. 其中许多功能实际上已经是Pressflow 6的一部分,如支持主/从数据库集群,代理,别名处理的改进等等。 So that doesn't help you much. 所以这对你没有多大帮助。

But there are also features which did not exist there, for example the pluggable field storage that allows you to store all your fields in MongoDB for example. 但是还有一些功能在那里不存在,例如可插拔的字段存储,允许您将所有字段存储在MongoDB中。 Also, while D7 in general is slower, the queries have been improved a lot and the bottleneck basically moved from the database to PHP, which is easier to cluster. 此外,虽然D7通常较慢,但查询已经得到了很大改进,瓶颈基本上从数据库转移到PHP,这更容易集群。

After all, D7 is able to power sites like http://examiner.com :) And they explicitly chose D7 over D6 for scalability improvements like MongoDB integration. 毕竟,D7能够为http://examiner.com等网站提供支持。他们明确选择D7而非D6,以实现MongoDB集成等可扩展性改进。

I think it is hard to tell which one is faster or slower. 我认为很难说哪一个更快或更慢。 Drupal 7 just see everything as entity. Drupal 7只是将所有内容视为实体。 But one thing I notice by drupal profiling https://drupal.org/project/profiling is Drupal 7 panel is extremely slow. 但是我通过drupal profiling https://drupal.org/project/profiling注意到的一件事是Drupal 7面板非常慢。 So I suggest we always go with templates. 所以我建议我们总是使用模板。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM