Field formatter iterates over the entire list of product fields for each product displayed

Created on 4 September 2024, 7 months ago
Updated 19 September 2024, 7 months ago

Problem/Motivation

The PADO field formatter iterates over the entire list of product fields for each product displayed. This has performance impacts when large numbers of products are displayed.

isApplicable() invokes getReferenceFieldOptions() every time it is run which happens once for every product displayed on a page. getReferenceFieldOptions() gets the list of fields on the product type and then runs checks on every field on the product in order to construct a list of fields to present in the product type display settings for that widget. It should not be used in isApplicable().

Proposed resolution

Remove isApplicable() from the PADO formatter. The parent class still checks to make sure the field is a variation field and that is enough.

In the widget settings form handle there being no options returned from getReferenceFieldOptions().

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States rhovland Oregon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024