If you’ve worked with Visual Studio for any length of time, you’ve probably noticed an inverse relationship between convenience and performance. ?Visual Studio is powerful on its own. ?And it gets a whole lot more powerful once you start adding plugins. ?But sometime between that clean Visual Studio install and your 20th helpful plugin, a noticeable slowdown occurs. ?The user experience starts to suffer.
Of course, this isn’t unique to Visual Studio. ?It applies to pretty much anything with a plugin ecosystem, such as a WordPress website or your browser. ?In all of these cases, you have to weigh the value of the plugin against the performance hit you suffer. ?But in the world of Visual Studio plugins, you often have more and better options than just disabling the plugins. ?You can manage them.
This is true of CodeIt.Right, SubMain’s automated code review tool. ?With a tool that provides code analysis, you might think your only lever to pull comes from turning warnings on and off. ?Not so. ?CodeIt.Right supports the concept of profiles, which let you set up different sets of rules to execute at different times. ?And this can really help the efficiency of your development efforts.
The Rationale for Profiles
Over the years, I’ve helped a lot of shops adopt the practice of automated unit tests. ?One of the most critical pieces of advice I give often surprises people initially. ?I tell them that a fast test suite is absolutely critical. ?And I’m far from alone in giving this advice.
Now, this may seem obvious in a sense. ?All things being equal, faster is, of course, better. ?But I go so far as to argue that your unit test suite becomes extremely ineffective if it takes a while. ?In fact, a long-running test suite becomes nearly useless. ?Why? ?Because it actively discourages people from using it. ?If your unit test suite takes minutes or even hours to run, how frequently will you really run it?
You hear about this a lot in the context of unit testing — not as much in other situations. ?But it’s just as important elsewhere. ?If your automated code review tool takes a long time to run, people will stop running it. ?This isn’t laziness on their part. ?Quite the contrary, in fact. ?They stop running it because it slows them down and prevents them from getting their work done.
So to get the most out of a tool like this, it’s extremely important that you pay close attention to how efficiently you’re using it. ?The world of automated unit tests has the notion of a “test pyramid,”?in which you have quick tests that you run all of the time and longer running ones that you run less frequently. ?Let’s take a look at different strategies for achieving the same thing with CodeIt.Right. ?How can you segment your analysis to get the best of both worlds: speed and thoroughness?