0

I just took over development of an existing EE website and am new to the cms and to blog development as well. First thing I noticed was that the site performed really poorly, so I just started doing some profiling using XDebug. I noticed that the query count is around 550. Is this normal? I know that it all comes down to what kind of queries are being run etc.. but I’m used to much lower numbers using other frameworks, but like I said: I’m new to blog development.

TLDR: What is the average ballpark query count for an EE homepage?

Thanks!

4

2 回答 2

2

在我的 EE2 测试安装中,一个空模板提取了 13 个查询(这些与会话、跟踪、抓取模板等有关)。除此之外,没有“平均”,因为内容的数量可能因站点而异。

550 个查询肯定是古怪的。我的猜测是有多个embeds,几个Channel Entries循环,以及其中的一些Playa 字段(Playa 有点像查询怪物)。

我建议打开输出探查器以查看负载来自哪里(管理 → 系统管理 → 输出和调试)。

然后,确保您在频道条目和其他标签上使用标签缓存,并考虑查看第三方缓存解决方案,例如CE Cache

您还可以禁用一些默认跟踪以保存查询(管理 → 安全和隐私 → 跟踪首选项)。

于 2012-07-24T12:35:51.663 回答
0

我已经建立了大量的 EE 网站,其中 500 个非常疯狂,非常高。使用 Structure/Matrix/Playa/ 的复杂构建,即使非常复杂的页面也只能运行 200-300。当我说“只有”时,我的意思是这仍然太高了。

我确实认为重要的是要在为您的客户使用令人愉快的东西和仍然不是处理器密集型之间找到平衡。如果您为此页面使用单个模板(即该模板不会用于一堆其他条目),您可以打开缓存,这将有很大帮助。

最大的问题是——你在这个页面上做什么?什么样的标签/插件等...可以帮助我们追踪它。

于 2012-07-26T16:35:26.037 回答