Conversation
9e5b2ab to
dbcfc52
Compare
|
Thanks @ThomasCrambert, I'll get a release out soon. |
|
@bkeepers Please make a new release with this change. |
|
Hello @bkeepers 👋, could you make a new release that would contain this change? It's been quite a while since the last one 🙏 |
|
@ThomasCrambert v3.2.0 is out with this change. Sorry for the delay. |
| diff = event.payload[:diff] | ||
| changed = diff.env.keys.map { |key| color_var(key) } | ||
| debug "Set #{changed.to_sentence}" if diff.any? | ||
| debug "Set #{changed.join(", ")}" if diff.any? |
There was a problem hiding this comment.
| debug "Set #{changed.join(", ")}" if diff.any? | |
| debug { "Set #{changed.join(", ")}" } if diff.any? |
This could be another improvement when the log level is to something less verbose, right?
There was a problem hiding this comment.
I think these are usually called only once (on boot) and does not matter.
There was a problem hiding this comment.
Alright, the PR made me think it's called multiple times. But apparently the slowdown came just from booting i18n. 😬
There was a problem hiding this comment.
But apparently the slowdown came just from booting i18n.
Yes that's the reason why I proposed this change. Dotenv shouldn't have any impact post-boot 👍
Hello 👋,
While introducing this gem within our codebase, we studied the boot time impact as it increased by 400ms. We tracked down an increase of 200ms from this gem at
dotenv/lib/dotenv/log_subscriber.rb
Line 27 in 91d98f0
#to_sentencethat under the hood callsI18n.translate(cf https://github.com/rails/rails/blob/main/activesupport/lib/active_support/core_ext/array/conversions.rb#L69).Since these are simple debug logs, I changed them to simple
.join(' ). Is that fine for you