Create Magento App
Create ScandiPWA AppScandiPWA DocsGitHub
v1
v1
  • Create Magento App
  • Getting started
    • Getting Started
    • Prerequisites
      • Linux requirements
      • MacOS requirements
        • Apple Silicon
      • Windows requirements
    • Available commands
      • Start the application
      • Stop the application
      • Check application status
      • Enter application CLI
      • Explore application logs
      • Execute commands in Docker containers
      • Link a theme
      • Import database dump
      • ⚠️ Uninstall a project
    • Folder structure
    • Updating to New Releases
      • Testing Alpha Releases
    • Configuration File
    • Supported Magento versions
    • How does it work?
    • Limitations
  • Usage guide
    • Using console commands
    • Accessing Docker containers
    • Linking a Scandi Theme
    • Enabling XDebug
    • Enabling SSL
    • Configuring PHP
    • Use custom domain
    • Access on the local network
    • Importing database
      • Importing remote database
    • Using Enterprise Edition
    • Converting legacy Docker setup to CMA
    • Improve Performance
  • Scripts Extensions
    • PHP Extensions
      • ionCube Extension
  • Troubleshooting
    • Common Issues
    • CMA Debugging
    • Uninstall CMA
Powered by GitBook
On this page
  • maritos/magento2-performance-fixes
  • Description
  • Installation
  1. Usage guide

Improve Performance

PreviousConverting legacy Docker setup to CMANextPHP Extensions

Last updated 2 years ago

maritos/magento2-performance-fixes

Description

To improve first request GraphQL performance we can use Composer package . (Source code available )

In general, this package changes the default cache building process, when the cache is empty, it locks all incoming requests and waits until the first request finishes building cache and then all following requests instead of rebuilding cache just use it right away.

So yeah, up to 30% speed improvements for GraphQL requests on the first load from a thin air.

Installation

Install Composer package

Install Composer package in your project.

npm run cli # open CLI

c require maritos/magento2-performance-fixes # install package

Extend composer.json

Add extra field in composer.json

composer.json
"extra": {
    "magento-force": "override",
    "enable-patching": true,
    "composer-exit-on-patch-failure": true,
    "patches": {
        "magento/framework": {
            "performance fix #1 - vendor/magento/framework/Config/Data.php": "vendor/maritos/magento2-performance-fixes/vendorPatch/magento/framework/Config/Data.patch",
            "performance fix #2 - vendor/magento/framework/App/ObjectManager/ConfigLoader.patch": "vendor/maritos/magento2-performance-fixes/vendorPatch/magento/framework/App/ObjectManager/ConfigLoader.patch",
            "performance fix #3 - vendor/magento/framework/Interception/Config/Config.patch": "vendor/maritos/magento2-performance-fixes/vendorPatch/magento/framework/Interception/Config/Config.patch"
        }
    }
}

Run composer install

After composer install make sure patches have been applied. Composer install output should be similar to:

  - Applying patches for magento/framework
    vendor/maritos/magento2-performance-fixes/vendorPatch/magento/framework/Config/Data.patch (performance fix #1 - vendor/magento/framework/Config/Data.php)
    vendor/maritos/magento2-performance-fixes/vendorPatch/magento/framework/App/ObjectManager/ConfigLoader.patch (performance fix #2 - vendor/magento/framework/App/ObjectManager/ConfigLoader.patch)
    vendorPatch/magento/framework/Interception/Config/Config.patch (performance fix #3 - vendor/magento/framework/Interception/Config/Config.patch)

That's it! Happy coding!

maritos/magento2-performance-fixes
here