From bb5b4054ff1931af5ebfb33abd73de757b9faa19 Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Sun, 23 Mar 2014 23:35:12 -0700 Subject: [PATCH] Don't bother processing asset hash on ignored resources. On a large project with a lot of Sprockets dependencies that were mostly ignored, this brought the build down from 30 minutes to 1 minute --- middleman-core/lib/middleman-more/extensions/asset_hash.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/middleman-core/lib/middleman-more/extensions/asset_hash.rb b/middleman-core/lib/middleman-more/extensions/asset_hash.rb index c417446a..014364c7 100644 --- a/middleman-core/lib/middleman-more/extensions/asset_hash.rb +++ b/middleman-core/lib/middleman-more/extensions/asset_hash.rb @@ -41,6 +41,7 @@ class Middleman::Extensions::AssetHash < ::Middleman::Extension def manipulate_single_resource(resource) return unless options.exts.include?(resource.ext) return if ignored_resource?(resource) + return if resource.ignored? # Render through the Rack interface so middleware and mounted apps get a shot response = @rack_client.get(URI.escape(resource.destination_path), {}, { 'bypass_asset_hash' => 'true' })