rust-cli / env_logger

A logging implementation for `log` which is configured via an environment variable.
https://docs.rs/env_logger
Apache License 2.0
797 stars 124 forks source link

perf: Replace `HashMap` with a `Vec` #241

Closed ChrisDenton closed 9 months ago

ChrisDenton commented 1 year ago

This may be a minor startup perf win (as env_logger does not need the expense of DoS resistant hashes) but my main reason for doing this is that the default hashing algorithm depends on random number generation, which may fail. This is important to avoid especially because env_logger is often used on program startup. This was a real issue on Windows. While that specific issue is now fixed, it would be nice to avoid this class of issues if possible.