Does a huge amount of warnings make C# compile time longer?

前端 未结 3 2087
梦谈多话
梦谈多话 2020-12-30 04:50

We have a big solution with thousands of warnings. Would it take less to compile the solution if I removed all of the warnings (either manually or using a tool)?

I\

3条回答
  •  一个人的身影
    2020-12-30 05:35

    Silencing the warnings has no effect on compilation time. Silencing affects whether the warnings are reported, not whether the compiler checks all rules or whether it generates errors/warnings.

    As Fox32 said, silencing the warnings is not a good idea. If you have too many of them somethings is seriously wrong with the code. This will also make compilation marginally faster as the compiler will have to handle fewer edge cases.

提交回复
热议问题