magento-hackathon / developer-paradise-2016

2 stars 3 forks source link

Optimize static view file caching #13

Open jissereitsma opened 8 years ago

jissereitsma commented 8 years ago

When enabling static view file caching, you will run a command like (bin/magento setup:static-content:deploy) to copy files from module-folders to the /pub folder. This is kind of slow: Some people report 3 minutes, others 30 minutes. Zooming into this problem, most files are copied regardless of their state - it is not matched whether the original file is the same as the public file, or whether the MD5 sum matches, or whether the timestamp suggests updating. This project would try to optimize this procedure by creating an interceptor plugin or a preference, to replace the original copying mechanism with a faster one.

For code reference, the class Magento\Deploy\Model\Deployer contains the source for tracing things down, especially the deploy() method - which again leads to $this->assetRepo->createAsset().

avstudnitz commented 8 years ago

Great idea. Hope you get to implement that!