• Stars
    star
    107
  • Rank 322,627 (Top 7 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Magento 2 product data preloaded for anticipated data in other components based on currently available product objects.

Product Data Pre-Loader

Magento platform code and third-party extensions in a lot of cases produce redundant database queries on product collections load.

This module provides an easy way to pre-load data for product collections like prices, stock data, and many more by using different types of load types. Right now it supports 3 types of loaded product collections:

  • list Products that are using price index in selection, so it is safe to use stale index data for data loader
  • cart Products that are used to calculate customers shopping cart and require accurate data to be loaded from database
  • other Products that are not falling into any of the above categories

In order to pre-load data for a product collection, you need to implement EcomDev\ProductDataPreLoader\DataService\DataLoader interface with such methods:

  • isApplicable(string $type): bool method that is used to decide if your loader compatible with specific product collection type.
  • load(ScopeFilter $filter, ProductWrapper[] $products): array method that preloads data into LoadService that can be used later to access data by your loader id.

Custom loaders should be added to LoadService object via DI configuration like this:

<type name="EcomDev\ProductDataPreLoader\DataService\LoadService">
    <arguments>
        <argument name="loaders" xsi:type="array">
            <item name="my_custom_loader" xsi:type="object">My\Module\Loader\MyCustomLoader</item>
        </argument>
    </arguments>
</type>

Installation

Given EOL of Composer 1 all new packagist packages are not published for some time. So best way to keep your install up-to-date is to use Composer 2.0.

composer require ecomdev/magento2-product-data-preloader

Usage Example

This sample module implements optimistic preloader for configurable product data without taking into account simple product status for:

  • Price of configurable product on product list
  • Stock availability from MSI for configurable product
  • Minimal tier price across simple products for configurable

More Repositories

1

EcomDev_PHPUnit

Magento PHPUnit Integration
PHP
300
star
2

EcomDev_LayoutCompiler

Layout Compiler for Magento
PHP
85
star
3

MageCI

[ABADONED] Magento Continuous Integration Tools
Shell
77
star
4

EcomDev_UrlRewrite

Alternative implementation of Url Rewrite Index by EcomDev
PHP
72
star
5

EcomDev_Varnish

Advanced Varnish implementation for Magento
PHP
63
star
6

sync-magento-2-migration

Release of rough proof of concept from 2018 that allows to import and export millions of products quickly
PHP
53
star
7

mage-os-database-changelog

Connects to MySQL as a replication service and aggregates updates into database tables into easy to use event aggregates
Rust
40
star
8

checkitout

Magento CheckItOut! extension, the checkout framework for Magento 1.x
PHP
35
star
9

fast-hypernode

Fast Byte Hypernode Box (Uses unison plugin for file shares)
Shell
31
star
10

SUPEE6788-PerformanceFix

Fix for SUPEE6788 performance bottleneck
PHP
24
star
11

EcomDev_ProductPageShipping

The extension is NOT SUPPORTED anymore. I advice use Webshopapps alternative instead.
PHP
22
star
12

php-mysql-binary-protocol

Implementation of MySQL binary protocol for socket interactions in pure PHP
15
star
13

magento-psr6-bridge

Magento 2.0 PSR-6 Adapter. Allows you to leverage all the cool libraries that require PSR-6
PHP
14
star
14

example-preloading-configurable-product

Example of Pre-Loader Implementation for Magento 2
PHP
10
star
15

cache-key

Cache key generator library, useful for not worrying about your cache key structure at all, library does all the magic for you
PHP
10
star
16

awesome-layered-navigation

Awesome Magento2 Layered Navigation
9
star
17

mysql-performance-benchmark

PHP
9
star
18

magento-migrations

Magento 2.0 Migrations module
PHP
9
star
19

magento2-test-essentials

Test essentials for writing testable code that interacts with Magento core modules
PHP
9
star
20

compiler

Compiler of parseable data structures from (XML, JSON, etc) into PHP code that can be included into application
PHP
8
star
21

magento2-compilation

Drop-In Replacement for setup:di:compile with better compilation performance and hyper-efficient runtime
8
star
22

EcomDev_ComposerAutoload

Extension that allows using of composer components inside of your project.
PHP
8
star
23

magento-translation-tool

A tool to generate Magento translation files from php code and xml files
8
star
24

chef-magento_varnish

Installs varnish as adopted to Magento version
VCL
7
star
25

phpspec-magento-di-adapter

This small PHPSpec extension allows you to test Magento 2.0 modules much more easier by utilizing generators of Magento\Framework\ObjectManager.
PHP
7
star
26

chef-magento

Chef Magento cookbook
Ruby
7
star
27

magento-custom-store-code

Magento 1.x Custom Store Code Extension
PHP
5
star
28

csrf-cookie-token-generator

HTTP server written in rust that generates CSRF token on request and stores it in cookie
Rust
5
star
29

chef-php_fpm

Chef cookbook for installing php-fpm
Ruby
3
star
30

examples

http://examples.ecomdev.org/
JavaScript
3
star
31

chef-vhost

Various vhost creation recipe
Ruby
3
star
32

cross-domain-session-manager

ReactPHP based session cross domain session manager
PHP
2
star
33

vagrant_magento2_nginx

Magento 2 Nginx Vagrant Box
Ruby
2
star
34

mage-os-indexer

Mage-OS improved indexer (base components)
PHP
2
star
35

composed-mutagen-hypernode-elastic

Hypernode with Elastic Search, Blackfire and Mutagen
Dockerfile
2
star
36

cache-warmer

Asycn Socket API based for pre-warming cache for varnish
2
star
37

chef-ecomdev_common

EcomDev Chef Cookbook Commons
Ruby
1
star
38

phpspec-file-matcher

PHPSpec File Matcher
PHP
1
star
39

rust-mysql-proxy

MySQL connection proxy with simplified protocol to connect from any language that does not have async mysql connection pool
Rust
1
star
40

performance-training

Performance training environment
Makefile
1
star
41

magento2-indexer-adapter

Magento 2 Common Testable Indexer Adapters
PHP
1
star
42

reactive-socket

Abstraction for reactive application that rely on socket servers and clients
PHP
1
star
43

color

Color tools for Image Processing
PHP
1
star