HomePhorge

FileCollection is a memory loss, not a memory win.
912ed3468b0aUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

FileCollection is a memory loss, not a memory win.

The file type used the FileCollection object to try and reduce memory
consumption by deduplicating path strings.

Unfortunately, this had the opposite effect in the real world, even when many
duplicate paths were present - it cost about 1.5MB extra memory in my tests.

It also costs non-trivial CPU time reconstituting the original path every time
we need to interact with that, and we do that a bunch.

So, just ditch the entire thing and move folks to just using paths directly.

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

Conflicts:
spec/unit/type/file_spec.rb

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
rPU89e0f142044e: type: support implicit "identity" transformation
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU912ed3468b0a: FileCollection is a memory loss, not a memory win. (authored by Daniel Pittman <daniel@puppetlabs.com>).Sep 18 2012, 2:56 AM