PHPackages                             scandipwa/performance - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. scandipwa/performance

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

scandipwa/performance
=====================

N/A

1.5.7(3y ago)4228.3k↑15.7%20[2 PRs](https://github.com/scandipwa/performance/pulls)6OSL-3.0PHP

Since Jan 6Pushed 3y ago2 watchersCompare

[ Source](https://github.com/scandipwa/performance)[ Packagist](https://packagist.org/packages/scandipwa/performance)[ RSS](/packages/scandipwa-performance/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (25)Used By (6)

ScandiPWA\_Performance
======================

[](#scandipwa_performance)

Enhanced performance of product loading.

### How to use

[](#how-to-use)

When adding a new resolved field to product interface, make sure to:

1. Understand when you are able to load it? If you can load it on collection, create a processor and register it in `CompositeCollectionProcessor` using DI.
2. If data is needed to be formatted, or you can not request data with collection, use `DataPostProcessor`. Register a processor there, and return a product (as key =&gt; value array) processing function (see example in implementations).
3. If data is impossible to request before collection load, but it is possible to append the loaded data afterwards (using the collection itself) - use `CollectionPostProcessor`, register the processor there in the same way as for `DataPostProcessor`.

### Related modules:

[](#related-modules)

- [quote-graphql](https://github.com/scandipwa/quote-graphql)
- [wishlist-graphql](https://github.com/scandipwa/wishlist-graphql)
- [catalog-graphql](https://github.com/scandipwa/catalog-graphql)
- [reviews-graphql](https://github.com/scandipwa/reviews-graphql)

### Initial motivation:

[](#initial-motivation)

> CASE ONE: The data can not be requested along with product collection (**only post-load is possible**)

1. After collection load, checked for requested fields in schema (using $info) for each additional info category
2. If additional info was requested, the helper requested &amp; returned the info for all products at once
3. The loop through all loaded products applying data from helpers to each specific product

> CASE TWO: The data can be requested before load (**field can be resolved with collection load**)

**This one is covered by M2 (by default) - we will just ignore this.**

1. The collection processor goes through collection, it adds requested fields to a collection
2. If field requires additional work, it is formatted after collection load
3. If field needs no formatting it is automatically out-putted in resulting data array

> CASE THREE: The data can be requested after collection load, but is based on the collection data, not product array.

### Potential Issues

[](#potential-issues)

a. The code duplicates in each of 5 places were the collection was loaded \[REQUIRES ABSTRACTION\] b. The data structures are common to be different from place to place, a check if field was requested or no is hard:

1. ConfigurableVariant: `variants/product`
2. Default: `products/items`
3. Cart, Wish-list: `items/product`
4. Orders: `order_products`

What was implemented
--------------------

[](#what-was-implemented)

### GraphQL schema reading trait *\[new\]*

[](#graphql-schema-reading-trait-new)

**Class name**: `ScandiPWA\Performance\Model\Resolver\ResolveInfoFieldsTrait`

**Motivation**: allows for GraphQL info parsing, can extract fields from path. By default returns array of product fields, the product field parsing can be changed by overriding `getFieldContent` method.

**Used in**:

1. `ScandiPWA\Performance\Model\Resolver\Products\DataPostProcessor\Images`
2. `ScandiPWA\Performance\Model\Resolver\Products\DataPostProcessor\Stocks`
3. `ScandiPWA\Performance\Model\Resolver\Products\DataPostProcessor\Attributes`
4. `ScandiPWA\CatalogGraphQl\Model\Resolver\ConfigurableVariant`
5. `ScandiPWA\CatalogGraphQl\Model\Resolver\Products\Query\Filter`
6. `ScandiPWA\WishlistGraphQl\Model\Resolver\WishlistItemsResolver`
7. `ScandiPWA\QuoteGraphQl\Model\Resolver\ProductsResolver`

### Collection post processor *\[new\]*

[](#collection-post-processor-new)

**Class name**: `ScandiPWA\Performance\Model\Resolver\Products\CollectionPostProcessor`

**Motivation**: allows to post-process collection, for situations, where data is applied on-top of loaded collection - media gallery data, product options data, etc.

**Used in**:

1. `ScandiPWA\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product`
2. `ScandiPWA\CatalogGraphQl\Model\Variant\Collection`

### Data post processor *\[new\]*

[](#data-post-processor-new)

**Class name**: `ScandiPWA\Performance\Model\Resolver\Products\DataPostProcessor`

**Motivation**: allows for loaded product collection data post-processing. Accepts array of products, resolve info and can efficiently process the product data. Is made to prevent child fields of products to request the data in the loop. Attribute, image, stock info is moved to this resolver out of product.

**Used in**:

1. `ScandiPWA\WishlistGraphQl\Model\Resolver\WishlistItemsResolver`
2. `ScandiPWA\QuoteGraphQl\Model\Resolver\GetCartForCustomer`
3. `ScandiPWA\CatalogGraphQl\Model\Resolver\Products\Query\Filter`
4. `ScandiPWA\QuoteGraphQl\Model\Resolver\ProductsResolver`
5. `ScandiPWA\CatalogGraphQl\Model\Resolver\ConfigurableVariant`

### Product data provider *\[modified\]*

[](#product-data-provider-modified)

**Class name**: `ScandiPWA\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product`

**Motivation**: previously the collection post processor was implemented here (hard-coded). Since it was moved into separate class, the logic had to be removed from origin.

**Used in**:

1. `ScandiPWA\QuoteGraphQl\Model\Resolver\ProductsResolver`
2. `ScandiPWA\CatalogGraphQl\Model\Resolver\Products\Query\Filter`

### Products Collection processor *\[modified\]*

[](#products-collection-processor-modified)

**Class name**: `Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product\CompositeCollectionProcessor`

**Motivation**: The M2 implementation was OK, just added additional processors to it:

1. `ScandiPWA\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product\CollectionProcessor\ImagesProcessor`

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~47 days

Recently: every ~87 days

Total

23

Last Release

1273d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c2cd642b3c520df20394344ee587782e246262899e7ddc99a191360e85d7fdc?d=identicon)[scandiweb](/maintainers/scandiweb)

---

Top Contributors

[![alfredsgenkins](https://avatars.githubusercontent.com/u/29531824?v=4)](https://github.com/alfredsgenkins "alfredsgenkins (26 commits)")[![AleksandrsKondratjevs](https://avatars.githubusercontent.com/u/68007919?v=4)](https://github.com/AleksandrsKondratjevs "AleksandrsKondratjevs (15 commits)")[![carinadues](https://avatars.githubusercontent.com/u/82165392?v=4)](https://github.com/carinadues "carinadues (9 commits)")[![denisprotassoff](https://avatars.githubusercontent.com/u/104761905?v=4)](https://github.com/denisprotassoff "denisprotassoff (4 commits)")[![riha112](https://avatars.githubusercontent.com/u/25338213?v=4)](https://github.com/riha112 "riha112 (4 commits)")[![aleksandrsm](https://avatars.githubusercontent.com/u/4189890?v=4)](https://github.com/aleksandrsm "aleksandrsm (3 commits)")[![tatiana-scandi](https://avatars.githubusercontent.com/u/79456428?v=4)](https://github.com/tatiana-scandi "tatiana-scandi (3 commits)")[![AzizKHAN030](https://avatars.githubusercontent.com/u/76899788?v=4)](https://github.com/AzizKHAN030 "AzizKHAN030 (3 commits)")[![RoboLV](https://avatars.githubusercontent.com/u/4116979?v=4)](https://github.com/RoboLV "RoboLV (2 commits)")[![zans-laksa](https://avatars.githubusercontent.com/u/73945186?v=4)](https://github.com/zans-laksa "zans-laksa (1 commits)")

### Embed Badge

![Health badge](/badges/scandipwa-performance/health.svg)

```
[![Health](https://phpackages.com/badges/scandipwa-performance/health.svg)](https://phpackages.com/packages/scandipwa-performance)
```

###  Alternatives

[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8044.5M33](/packages/smile-elasticsuite)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50374.2k18](/packages/dotdigital-dotdigital-magento2-extension)[swissup/module-search-mysql-legacy

Legacy mysql search for magento 2.4

10483.0k](/packages/swissup-module-search-mysql-legacy)[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[trustpilot/module-reviews

The Trustpilot Review extension makes it simple and easy for merchants to collect reviews from their customers to power their marketing efforts, increase sales conversion, build their online reputation and draw business insights.

12886.7k](/packages/trustpilot-module-reviews)[graycore/magento2-graphql-introspection-cache

1015.2k](/packages/graycore-magento2-graphql-introspection-cache)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
