elgentos / largeconfigproducts

elgentos/largeconfigproducts

magento2-module Compatibility: Not yet tested Code Quality: Fail Tests: N/A Security: N/A

Elgentos_LargeConfigProducts

This extension is built to work around the problems Magento 2 is causing when using configurable products with extremely large amounts of simple products associated to it. Magento 2 can handle up to around 3000 associated simple products pretty well. Above that, it becomes extremely slow and sometimes unusable (such as webserver timeouts).

Example

peek 2018-01-19 10-14

Problems it tries to solve

The main problems are;

  • In the frontend, Magento 2 loads all variations (associated simple products) in a giant JSON object and renders that into the DOM. This JSON object is 20 megabytes for 10k variations.
  • In the backend, this JSON is also built and passed to a UI component wrapped in XML. PHP's xmllib is not able to append extremely large XML structures to an existing XML structure.

We have created workaround for both problems. In the frontend, we offload fetching the JSON blob through an AJAX request. The JSON itself can be pre-warmed using a console command and is stored in Redis. We chose Redis over the Magento cache system itself because Redis is not flushed when the entire Magento cache is flushed (for example, during deployment).

When the product page is loaded and there is no cache entry, it will create it then. This will of course take longer than pre-warming the cache entries.

In the backend we use DOMDocument's and the LIBXML_PARSEHUGE constant to handle the extremely large XML structure.

This extension is free to use. If you find any bugs, please let us know. It has been tested on Magento 2.2.2 on PHP 7.0.

Console command

This extension comes with a console command, php bin/magento lcp:prewarm. This console command pre-warms the JSON blobs so your customers don't have to wait for the cache to build up on the first hit on the product page.

The command has a few options;

--products 123,456,789 - define for which product ID(s) you want to run the prewarmer

--storecodes english,dutch,german - define for which store code(s) you want to run the prewarmer

--force true - force the prewarmer to overwrite existing entries. Otherwise the prewarmer will skip product/storecode combinations that already have an entry.

No changelog yet

The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.

Versions
Version Stability QA Status Compatibility Released
0.3.5 stable Fail Not yet tested Details 2019-08-07 14:15:22
0.3.4 stable Not tested Not yet tested Details 2019-08-07 09:32:32
0.3.3 stable Not tested Not yet tested Details 2019-04-18 12:56:08
0.3.2 stable Not tested Not yet tested Details 2019-04-18 12:54:20
0.3.1 stable Not tested Not yet tested Details 2019-04-17 07:11:45
0.3.0 stable Not tested Not yet tested Details 2019-04-16 12:51:35
0.2.17 stable Not tested Not yet tested Details 2019-04-01 13:33:54
0.2.16 stable Not tested Not yet tested Details 2019-03-27 12:47:38
0.2.15 stable Not tested Not yet tested Details 2019-03-27 10:08:40
0.2.14 stable Not tested Not yet tested Details 2019-03-26 15:27:27
0.2.13 stable Not tested Not yet tested Details 2019-03-26 14:14:05
0.2.12 stable Not tested Not yet tested Details 2019-01-04 11:06:45
0.2.11 stable Not tested Not yet tested Details 2018-12-13 09:02:51
0.2.10 stable Not tested Not yet tested Details 2018-12-04 15:21:39
0.2.9 stable Not tested Not yet tested Details 2018-12-03 14:45:55
0.2.8 stable Not tested Not yet tested Details 2018-11-15 21:10:25
0.2.7 stable Not tested Not yet tested Details 2018-11-15 13:27:03
0.2.6 stable Not tested Not yet tested Details 2018-11-13 16:08:38
0.2.5 stable Not tested Not yet tested Details 2018-10-09 14:52:27
0.2.4 stable Not tested Not yet tested Details 2018-09-27 09:17:53
0.2.3 stable Not tested Not yet tested Details 2018-09-26 12:32:43
0.2.2 stable Not tested Not yet tested Details 2018-09-25 09:04:42
0.2.1 stable Not tested Not yet tested Details 2018-09-19 10:38:41
0.2.0 stable Not tested Not yet tested Details 2018-09-14 13:40:33
0.1.10 stable Not tested Not yet tested Details 2018-07-03 13:32:08
0.1.9 stable Not tested Not yet tested Details 2018-03-23 18:21:17
0.1.8 stable Not tested Not yet tested Details 2018-03-22 09:13:15
0.1.7 stable Not tested Not yet tested Details 2018-03-20 15:23:22
0.1.6 stable Not tested Not yet tested Details 2018-02-22 10:23:29
0.1.5 stable Not tested Not yet tested Details 2018-02-21 14:00:20
0.1.4 stable Not tested Not yet tested Details 2018-02-21 13:29:12
0.1.3 stable Not tested Not yet tested Details 2018-01-23 10:18:35
0.1.2 stable Not tested Not yet tested Details 2018-01-19 11:24:40
0.1.1 stable Not tested Not yet tested Details 2018-01-19 11:07:45
0.1.0 stable Not tested Not yet tested Details 2018-01-19 09:22:14

Requires 4

Package Constraint
php ~5.5.0|~5.6.0|~7.0.0|~7.1.0|~7.2.0
renatocason/magento2-module-mq ^1.0
renatocason/magento2-module-mq-mysql ^1.1
magento/module-configurable-product ^100.2.8

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 not tested not tested
2.4.8 not tested not tested
2.4.9 not tested not tested

Code Quality - Static Tests

Checks run directly against the module's source code, independent of any Magento or PHP version: coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity, and a security audit of its declared dependencies. Each runs once.

Static code-quality results
Tool Status Findings Summary
PHPCS Fail 68 5 errors, 63 warnings (ruleset: Magento2) — 30 auto-fixable with phpcbf
PHPMD Warning 10 10 rule violations (UnusedFormalParameter:6, MissingImport:3, EmptyCatchBlock:1)
Cpd Pass 0
Composer validate Info 2 valid; 2 advisory notes (composer validate --strict)
Composer audit N/A 0 no resolvable dependency tree to audit — Your requirements could not be resolved to an installable set of packages. Problem 1

Code Quality - PHPStan

PHPStan type-checks the module's PHP against a real Magento install (so framework and core-module symbols resolve) at the configured gate level. Because the available symbols differ between releases, it runs separately for each Magento and PHP version. The grid below shows the result for each pairing; select one to see its findings. This never affects compatibility.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

No license declared

This package's composer.json doesn't declare a license, homepage, or authors. Check the source repository for terms of use.

More from elgentos

View vendor
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.