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 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大