mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Performance enhancement
This commit is contained in:
parent
b08e2c4912
commit
cf76e4c64a
@ -394,15 +394,17 @@ class CombineAssets
|
||||
{
|
||||
$key = '';
|
||||
|
||||
$allFilters = call_user_func_array('array_merge', $this->getFilters());
|
||||
|
||||
$assetFiles = array_map(function($file) {
|
||||
return $this->localPath.'/'.$file;
|
||||
}, $assets);
|
||||
|
||||
foreach ($allFilters as $filter) {
|
||||
if (method_exists($filter, 'hashFromAssets')) {
|
||||
$key .= $filter->hashFromAssets($assetFiles, $this->localPath);
|
||||
foreach ($assetFiles as $file) {
|
||||
$filters = $this->getFilters(File::extension($file));
|
||||
|
||||
foreach ($filters as $filter) {
|
||||
if (method_exists($filter, 'hashAsset')) {
|
||||
$key .= $filter->hashAsset([$file], $this->localPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user