Turns out that fetching variables from the config object is expensive, so doing it once at startup avoids unnecessary work.