middleman/middleman-core
Mark Rowe 65462cbc43 Improve performance of ignoring files (#1971)
* Determine the type of ignore pattern once per pattern.

Performing this work when checking when each file was ignored accounted
for around 4.5 of the 6 seconds that processing ignored files was taking
on a site with ~14,000 files and a small number of ignore patterns.
After this change, processing ignored files takes less than 1.5 seconds.

* Cache the normalized paths on Resource and SourceFile.

Normalizing the paths is expensive, so avoid doing it multiple
times. `Util::normalize_path` is marked as memoized, but this
is not effective as:

1. `memoize` doesn't appear to work with module functions.
2. Checking whether we have a memoized value is as expensive as
   normalizing the path.

This further drops the time it takes to process ignored files on a site
with ~14,000 files from ~1.5 seconds to ~0.6 seconds.
2016-08-12 16:33:18 -07:00
..
features Add prefix option to asset_hash (#1949) 2016-07-02 17:55:25 -07:00
fixtures Add prefix option to asset_hash (#1949) 2016-07-02 17:55:25 -07:00
lib Improve performance of ignoring files (#1971) 2016-08-12 16:33:18 -07:00
spec Fix asset_url with asset_hash (#1919) 2016-05-22 12:31:53 -07:00
.gemtest enable gemtest at a per-gem level 2012-01-02 14:48:47 -08:00
.rspec Forward port some stable changes 2015-09-17 09:41:17 -07:00
.simplecov ignore vendor in simplecov 2013-06-04 14:28:46 -07:00
.yardopts Improve documentation for Middleman::Extension 2014-05-11 00:35:15 -07:00
cucumber.yml Forward port some stable changes 2015-09-17 09:41:17 -07:00
middleman-core.gemspec Updating to activesupport version 5 (#1967) 2016-08-03 12:59:57 -07:00
Rakefile Cop 2016-01-14 11:21:42 -08:00