puppetlabs / facter

Collect and display system facts
https://puppet.com/open-source/#osp
Apache License 2.0
616 stars 494 forks source link

Use Set instead of Array for warn & debug messages #2709

Closed mhashizume closed 1 month ago

mhashizume commented 2 months ago

Prior to this commit, Facter's logger used Arrays to store warn and debug messages. When using the warnonce and debugonce options, Facter would call #include? on the warn and debug arrays.

This commit updates Facter to use Sets instead of Arrays to store warn and debug messages, making it more performant to search through the messages (i.e. call #include?).