HomePhorge

Eliminate require calls at runtime.
37742db73df7Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Eliminate require calls at runtime.

Calling require is a surprisingly expensive operation, especially if
ActiveRecord has been loaded. Consequently, the places where we do that in
the body of a function are hot-spots in the profile.

They are also, generally, pretty simple and clear wins: almost all of them can
simply require the library the first time they are loaded and everything will
work fine.

In my testing with a complex, real-world set of manifests this reduces time
spent by ~ 3 wall-clock seconds in require and all children.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUc737f5066e6a: Merge pull request #828 from joshcooper/ticket/2.7.x/set-scheduled-tasks
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU37742db73df7: Eliminate require calls at runtime. (authored by Daniel Pittman <daniel@puppetlabs.com>).Jul 11 2012, 12:30 AM