Logging: a silent performance killer

That sounds nice, although I’m not familiar enough yet with when/where Hex dependencies are compiled and/or cached. From my experiments it seemed explicitly recompiling a dependency is necessary for :compile_time_purge_level to have any effect.

Lessons learned

As a package consumer I need a tool that can query a call graph from a project and its dependencies. Of course this assumes I maintain a list of queries I care about. If I were using Backtrex (before @jwarlander’s improvement) I’d use such a tool to query for potentially problematic calls like Logger.debug. In this case I’d expect to get back a report of filenames and line numbers that call Logger.debug, and then I could quickly audit all those lines. Anyone know of a query tool that already does this?

Looking at the problem from the perspective of the package publisher a static analysis tool could have helped detect the problem and suggest a refactoring. I’m already using credo to lint Backtrex’s code, but it doesn’t yet pick up on potentially expensive logging calls. [edit: I’ve submitted a proposal]