middleman/middleman-core/lib/middleman-core/sitemap/extensions
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
..
ignores.rb Improve performance of ignoring files (#1971) 2016-08-12 16:33:18 -07:00
import.rb Expose all config options to CLIs. Helps with #1829 2016-03-12 13:55:25 -08:00
move_file.rb Convert more basic config commands to ConfigExtensions 2016-01-12 10:38:53 -08:00
on_disk.rb Some tweaks to get blog working 2015-09-14 17:37:35 -07:00
proxies.rb Improve performance of ignoring files (#1971) 2016-08-12 16:33:18 -07:00
redirects.rb Fix japanese characters encoding in URLs 2016-07-10 17:03:22 -07:00
request_endpoints.rb Convert more basic config commands to ConfigExtensions 2016-01-12 10:38:53 -08:00
traversal.rb Cop 2016-01-14 11:21:42 -08:00