doufen9815 2012-05-03 17:42
浏览 21
已采纳

复杂的ExpressionEngine模板:可以渲染<= 1秒?

I've optimized a complex ExpressionEngine template to the best of my knowledge, and I'm still looking to get rendering time under 1 second, whether I need to make application-level adjustments or server-level adjustments.

The page in question is grid of 195 projects, each with several one-to-many relationships (client, vendor, office, etc.) that are actually displayed and filterable. These relationships are maintained by a Playa.

uncached: 16.0904 seconds, 50.11MB, 5264 queries

after application-level caching: 2.0793 seconds, 28.37MB, 476 queries

The drop is largely a result of EE's template caching, tag caching, and channel "disable" parameters per this EE Wiki Optimization article.

This is all happening on a MediaTemple DV4 (LAMP) server with 512MB of memory, which I imagine will get destroyed at this rate. Production site traffic is ~4K pageviews per day.

The only idea I've had so far is to load only featured items and save the (larger, initially hidden) chunk of content asynchronously. The only reason I don't like that idea is the potential ding for SEO. Each project has a detail page, so it may not be an issue, but it seems like this is all useful information to have indexed.

Are there any safe ways, without hacking ExpressionEngine's core, to drop my minimum page rendering time to less than a second? Have I simply set myself up to fail?

  • 写回答

2条回答 默认 最新

  • dongsetan3216 2012-05-03 20:40
    关注

    This is what asynchronous loading excels at ... if you're worried about SEO implications, add some pagination links, then hide those with javascript when you initialize your AJAX stuff. Over 5k queries uncached is, IMHO, completely unacceptable. With 4k views a day, some folks will get hit with that cache-breaking pageview, and it won't be pretty!

    Regardless ...

    My guess is that most of those remaining queries after caching are coming from Playa. It makes a lot of queries. Adding cache and refresh parameters directly to Playa tag pairs will further help you here.

    If you're willing to buy an add-on to help, I'd highly-reccomend CE Cache. It will supersede all your native caching by just scooping up the whole lot for you and caching it as a file, in the database, or via a slew of other popular server-level caching mechanisms.

    Good luck. :)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用