Noted in erlang/otp #8493, the compilation of a module with a ton of warnings can spend most of its time trying to tell you about the warnings. Compilation, in this case can be sped up by telling the compiler to not work so hard at that, with compiler options brief or nowarn_nomatch.
erlc +time is a good way to see where the slowdown is when compiling code, when it's not "formatting a bunch of warnings".