HomePhorge

(#17820) Avoid allocating and copying hashes unnecessarily
3caa3937f266Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#17820) Avoid allocating and copying hashes unnecessarily

Commit 737c2f66 was implemented to ensure portability with ruby 1.8.5,
but in doing so, it caused severe performance problems, likely due to
allocating a hash, and then merging that, and returning a copy of the
merged hashes.

This commit eliminates the performance issue by not attempting to
merge the hashes, while maintaining compatibility with ruby 1.8.5.

The original code implemented in commit 7002eff7 should be restored in
3.x as that is even faster than this commit, but does not maintain
compatibility with ruby 1.8.5.

Reviewed-by: Josh Cooper <josh@puppetlabs.com>

Details

Provenance
Linus Sellberg <sellberg@gmail.com>Authored on
Josh Cooper <josh@puppetlabs.com>Committed on Nov 27 2012, 7:13 AM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUcb9696de4e2c: Update lib/puppet/version.rb for 2.7.20
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPU3caa3937f266: (#17820) Avoid allocating and copying hashes unnecessarily (authored by Linus Sellberg <sellberg@gmail.com>).Nov 27 2012, 7:13 AM