Found during automated review of PR #398.
With the template memoized, the md5 fingerprint staleness re-check in Lua.VM.Bootstrap costs ~0.23 µs of the ~0.44 µs Lua.new() (52%) — and it is paid on every call in :interactive code mode, which includes deployments that never reload code (mix phx.server in a container, escripts, mix run --no-halt). Only mix release (embedded mode) skips it.
Consider gating the re-check on something stronger than :code.get_mode() — e.g. a compile-time Application.compile_env switch defaulting to dev/test-only — so production non-release deployments get the full fast path. Needs care not to break the iex live-reload story the check exists for.
🤖 Filed from an automated review pass.
Found during automated review of PR #398.
With the template memoized, the md5 fingerprint staleness re-check in
Lua.VM.Bootstrapcosts ~0.23 µs of the ~0.44 µsLua.new()(52%) — and it is paid on every call in:interactivecode mode, which includes deployments that never reload code (mix phx.serverin a container, escripts,mix run --no-halt). Onlymix release(embedded mode) skips it.Consider gating the re-check on something stronger than
:code.get_mode()— e.g. a compile-timeApplication.compile_envswitch defaulting to dev/test-only — so production non-release deployments get the full fast path. Needs care not to break the iex live-reload story the check exists for.🤖 Filed from an automated review pass.