HomePhorge

(PUP-751) Check for reparse once per compile
3126e77c5d14Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-751) Check for reparse once per compile

Previously, whenever the known_resource_types
(Puppet::Resource::TypeCollection) was retrieved from the
environment it would check if there were any files that needed to be
reparsed. If any files needed a reparse, then the entire TypeCollection
was thrown away and redone.

In most cases the reparse check did not need to touch the filesystem
because the Puppet::Util::PeriodicWatcher would return a cached result
until the filetimeout had expired. Unfortunately the check was done so
often that the overhead of simply checking if enough time had passed
caused it to take a considerable amount of time.

This changes it so that the environment's known resource types are only
recalculated if the new check_for_reparse method determines that it
should. The new method is only called at the beginning of a compile and
so the files will never be checked while a compilation is being
executed.

Details

Provenance
Andrew Parker <andy@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU5b723279b3ff: (maint) Switch from -fd to -fp for specs to reduce disk space usage
Branches
Unknown
Tags
Unknown

Event Timeline

Andrew Parker <andy@puppetlabs.com> committed rPU3126e77c5d14: (PUP-751) Check for reparse once per compile (authored by Andrew Parker <andy@puppetlabs.com>).Feb 14 2014, 12:40 AM