Skip to content

Category performance #292

@rhoerr

Description

@rhoerr

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:

  1. The category handling was faster, or
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions