日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SAP Spartacus CMS 页面加载逻辑和性能的优化

發布時間:2023/12/19 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SAP Spartacus CMS 页面加载逻辑和性能的优化 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

https://github.com/SAP/spartacus/issues/3649

SAP Commerce Cloud CMS 頁面加載的一些優化點:

  • Payload of the CMS page structure - 待加載CMS 頁面結構的負載
  • Splitting the CMS page structure in both page and page template CMS
  • improve cache-ability of the CMS page structure

CMS page structure payload (#3668)

One of the main performance gains will be around the CMS page structure which is loaded when we navigate the storefront. The current payload is polluted and too heavy weighted for the purpose, and is loaded over and over again during navigation.

目前的Spartacus實現里,后臺OCC API返回的很多數據,在Spartacus里根本不需要。

Currently the page payload is polluted with data which is required for SmartEdit integration. This includes the page.uuid, contentSlot.slotUuid and component.uuid. These fields contain a pretty long hash, and are only required during the SmartEdit integration and not required for the production storefront.

比如下圖這些數據,只是為了和 SmartEdit集成用的。

While there is actually a good reason to reload page data while navigating (in order to support the CMS restrictions which might expose new pages and components during navigation), the possibility that component would actual change on a 2nd page load is fairly low.

盡管每次跳轉時,重新從SAP Commerce Cloud 后臺讀取CMS頁面數據,是為了支持 CMS restriction,及下圖所示的設置:

但是兩次跳轉過程中,CMS page Restricted Page Types 在后臺發生變化的可能性太低太低。

Therefor we should consider a more efficient API that will be used to evaluate if there’s a change. If any, we could do an additional call, or – even better – introduce server push to preload it automatically.

因此有必要設計一個API,用來評估后臺CMS restriction是否發生變化:僅當真的有變化時,才重新加載頁面。

https://github.com/SAP/spartacus/issues/3668

Avoid reloading full page data (see #3667)

Additionally, the current page payload contains both the CMS page structure as well as the associated CMS page template structure. As already pointed out, the payload is heavy, and blocks the experience. In order to optimise, we should avoid loading the full payload during navigation.

更多Jerry的原創文章,盡在:“汪子熙”:

總結

以上是生活随笔為你收集整理的SAP Spartacus CMS 页面加载逻辑和性能的优化的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。