Details
-
Improvement
-
Status: Accepted
-
Normal
-
Resolution: Unresolved
-
None
-
None
-
None
-
Coremunity
-
Needs Assessment
Description
Puppet::Util::Warnings#maybe_log stores the list of messages that it has logged from each class in an array, and uses Array#include? to see whether the message has already been seen. This has the potential to slow down significantly as the number of messages logged from a specific class increases.
We should probably look into storing the set of previously seen messages in something with a lookup time closer to O(1) than the current O(N) scan through the array.