You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cache the results of isCacheable calls to improve performance
This function call is relatively expensive when $elements has the full layout in it. Especially the PageCache module is calling this function a lot from the following places:
- Magento\PageCache\Model\Layout\LayoutPlugin
- Magento\PageCache\Observer\ProcessLayoutRenderElement
On my local machine I've seen the impact to be anywhere between 20-40 milliseconds, when the page has been loaded a few times to warm up cache (config, block, layout, etc...), but FPC is circumvented.
We could also opt to move this to the PageCache module, but I think it is ok to optimize this within the Layout class within the framework.
0 commit comments