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

This commit is contained in:
Ben Hollis 2014-03-23 23:35:12 -07:00
parent 0a6c80d223
commit bb5b4054ff

View file

@ -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' })