更改 CCK 内容类型详细信息会导致菜单系统出现大量 DB 调用
每次我对内容类型的细节进行更改时,都会花费很长时间。我认为这与我有太多的内容类型和字段(~500)有关,但是当我加载开发模块来查看需要这么长时间的查询时,我看到:
在 12267.57 毫秒内执行了 32212 个查询。耗时超过 5 毫秒的查询和执行多次的查询会突出显示。页面执行时间为 55763.32 毫秒
当我查看详细信息时,我注意到绝大多数数据库调用来自菜单系统,例如:
- _menu_route
- menu_local_tasks
- admin_menu_link_save
这是为什么?我可以避免其中一些吗?这似乎不符合逻辑!
Every time I make a change in the details of a content-type it takes too long. I though it had to do with the fact that I had too many content-types and fields (~500), but when I load the devel module to see the queries that take that long I see:
Executed 32212 queries in 12267.57 milliseconds. Queries taking longer than 5 ms and queries executed more than once, are highlighted. Page execution time was 55763.32 ms
When I see the details I notice that the vast majority of db calls come from the menu system, e.g.:
- _menu_route
- menu_local_tasks
- admin_menu_link_save
Why is that? Can I avoid some of these? It doesn't seem logical!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
500 个字段很多,而且更有可能出现问题。每次执行 32K 查询,速度就会变慢 - 每个对数据库的请求都需要时间来设置和执行。您可能需要研究某种方法来合并其中一些字段。
500 fields is a lot and are more likely to be the problem. with 32K queries per go, there's your slowdown - each request to the db takes time to set up and execute. You may need to look into some way of consolidating some of these fields.