magento-hackathon/StaticContentDeploy

Name: StaticContentDeploy

Owner: FireGento e. V. - Hackathons

Description: null

Created: 2016-04-25 09:11:59.0

Updated: 2018-03-30 14:52:22.0

Pushed: 2016-04-25 15:19:40.0

Homepage: null

Size: 12

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

StaticContentDeploy

This project is meant as base for work to optimize the static view file caching process.

Goals

There are multiple areas which we try to improve, to cut the time it takes to run the static content deploy process shorter:

Step: Pull Request for adding arguments to deployment command

@denisristic has created a PR for the Magento 2 core to add various arguments to the deployment command, so that a deploy only copies for instance theming or JavaScript.

https://github.com/magento/magento2/pull/4294

Step: Pull Request for adding MD5 checksums

@jissereitsma has created a PR for the Magento 2 core that will check whether a file is modified or not. The original deploy only allows for file copying if the destination does not exist. This PR performs a MD5 check to see if the original is different from the deployed file. Together with @denisristic it is a perfect combination to determine which file is copied where, instead of copying all files at once.

https://github.com/magento/magento2/pull/4295

Step: Module StaticContentDeployDebugger

This repository contains a StaticContentDeployDebugger module to allow you to log (with timings) which files are being copied where. Simply copy the module to app/code/ and it should log to var/system.log. Do NOT enable this module on a live site.

The module dumps for each static deploy copy a line to the system.log mentioning the time it took to copy things (in milliseconds), the original file and the destination file. Timestamps should be around 0.2 - 0.3 ms. If it is more, there is an issue with your disk (or optimization of the filesystem). If the file already exists in the pub/static folder, no file is copied and log entry is made either.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.