-
-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Issue
I was profiling category performance on a client site via New Relic, and found Yireo_GoogleTagManager2 adding 100-150 ms to the response time with a category page size of 20. 4-8ms per product shown.
Context
For this site, product list view info is not super important, so that performance hit on every uncached category request isn't worth it.
I cut it down for now by setting the "Maximum Products in Category" setting to 1, so it only processes the top product.
I considered disabling \Yireo\GoogleTagManager2\DataLayer\Tag\Category\Products entirely.
I think most of the delay is from loading category info for each product. There's no easy way to change that with a plugin either, because getProductCategory and attachCategoriesData are private methods.
Suggestion
It would be nice if:
- The category handling was faster, or
- The product list behavior and info was configurable, so we could turn off including product categories or the product view data entirely
Aside, it seemed like this catalog_category_view data layer handling does not extend to search results (catalogsearch_result_index), so I'm not clear how useful it is in the first place.
Thanks