企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## 备注: 也许会有其他性能问题 ## 异步发邮件: ![](https://img.kancloud.cn/f0/f9/f0f957a33626f5739ba45d138b957b03_1511x548.png) 参考:[Improve and Fix Slow Magento 2 Performance Top issues | by Yegor Shytikov | Medium](https://yegorshytikov.medium.com/improve-and-fix-slow-magento-2-performance-top-issues-e00ac2999171) ## js 延迟加载/打包 优化,  用 magesuite/magepack 方案 [https://github.com/magesuite/magepack](https://github.com/magesuite/magepack) 使用方式: [https://yegorshytikov.medium.com/magento-2-google-page-speed-insights-performance-optimisation-using-mage-pack-3e074ed9d1da](https://yegorshytikov.medium.com/magento-2-google-page-speed-insights-performance-optimisation-using-mage-pack-3e074ed9d1da) ***** ## 用户信息section性能: https://alanstorm.com/understanding-the-limitations-of-sectionsxml/ [https://amasty.com/blog/how-to-use-sections-in-magento-2/](https://amasty.com/blog/how-to-use-sections-in-magento-2/) Resolving Session Bottleneck in Magento AJAX Requests : 同步session 堵塞问题: [https://www.integer-net.com/resolving-session-bottleneck-magento-ajax-requests/](https://www.integer-net.com/resolving-session-bottleneck-magento-ajax-requests/) ***** ### DB 检查处理 log 日志: 方法:检查 \_log , \_report  等表是否很大,清理: dataflow\_batch\_export, dataflow\_batch\_import, log\_customer, log\_quote, log\_summary, log\_summary\_type, log\_url, log\_url\_info, log\_visitor, log\_visitor\_info, log\_visitor\_online, report\_viewed\_product\_index, report\_compared\_product\_index, report\_event, index\_event, Catalog\_compare\_item. ***** ### 检查和清理 没用的 品类和商品,属性 attributes :Stores > Attributes > Product [https://onilab.com/blog/magento-admin-back-end-slow/](https://onilab.com/blog/magento-admin-back-end-slow/) ***** ### 图片lazyload实现 可以尝试方案:[https://github.com/aFarkas/lazysizes](https://github.com/aFarkas/lazysizes) ***** ### **字体资源****问题** ![](https://img.kancloud.cn/33/07/3307fbf830a176e5584b6a75dca13c4e_695x88.png) 解决方案1:![](https://img.kancloud.cn/d1/ef/d1effc3a13c8a9a53b69996784643442_514x367.png) 参考: [**https://onilab.com/blog/magento-google-pagespeed-insights-optimization-guide/**](https://onilab.com/blog/magento-google-pagespeed-insights-optimization-guide/) 解决方案2:用google font api [https://www.webfx.com/blog/web-design/google-font-api-guide/](https://www.webfx.com/blog/web-design/google-font-api-guide/) https://medium.com/@ssniranga/how-to-add-google-font-to-magento2-98908b7e396e [https://blog.petehouston.com/add-google-fonts-to-theme-in-magento-2/](https://blog.petehouston.com/add-google-fonts-to-theme-in-magento-2/) ***** ### configurable-product-performance ![](https://img.kancloud.cn/5f/e0/5fe0412f3e9c825a75d5fd2401e9fc46_532x411.png) 参考文章: [https://yegorshytikov.medium.com/magento-2-configurable-product-performance-profiling-a81696a2848e](https://yegorshytikov.medium.com/magento-2-configurable-product-performance-profiling-a81696a2848e) ***** ### 事件观察者 [https://magento.stackexchange.com/questions/298020/magento-cataloginventory-observer-quantityvalidatorobserver-slow-performance](https://magento.stackexchange.com/questions/298020/magento-cataloginventory-observer-quantityvalidatorobserver-slow-performance) **这事件和监听 ,检查是不是可以去掉, 商品列表页 执行太多次数** **magento\_catalog\_api\_data\_productinterface\_load\_after** **\-》****Magento\\Framework\\EntityManager\\Observer\\AfterEntityLoad** **\-》****catalog\_product\_load\_after** **\-》****Magento\\CatalogInventory\\Observer\\AddInventoryDataObserver** 检查和去掉无用的事件监听 解决方案: ![](https://img.kancloud.cn/2a/29/2a29a587928e1103e627d76ab6565943_1090x213.png) 结果: ![](https://img.kancloud.cn/ee/9f/ee9f9c6739971b277c9e54ca53da71d9_307x189.png)![](https://img.kancloud.cn/54/7f/547fe31532bbd2e1d107cca1bf6e5395_302x198.png)